Database query error [PLZ HELP!!!]

Recently I am receiving a Database query error when trying to search for members.  I can NOT install 6.1.5 because of other errors that are being looked at so I need to get this fixed ASAP...  Someone PLEASE help me!  Here is the email received about the error...

Database error in GoZoKo
Query:
SELECT COUNT(*) FROM `Profiles` WHERE  AND (`Profiles`.`Couple`='0' OR `Profiles`.`Couple`>`Profiles`.`ID`) AND `Profiles`.`Status` = 'Active'

Mysql error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND (`Profiles`.`Couple`='0' OR `Profiles`.`Couple`>`Profiles`.`ID`) AND `Profil' at line 1

Found error in file /home/gsmithjr/public_html/browse.php
at line 325. Called db_arr function
with erroneous argument #0

Debug backtrace:
Array
(
[1] => Array
(
[file] => /home/gsmithjr/public_html/inc/db.inc.php
[line] => 115
[function] => db_res
[args] => Array
(
[0] => SELECT COUNT(*) FROM `Profiles` WHERE  AND (`Profiles`.`Couple`='0' OR `Profiles`.`Couple`>`Profiles`.`ID`) AND `Profiles`.`Status` = 'Active'
[1] => 1
)

)

[2] => Array
(
[file] => /home/gsmithjr/public_html/browse.php
[line] => 325
[function] => db_arr
[args] => Array
(
[0] => SELECT COUNT(*) FROM `Profiles` WHERE  AND (`Profiles`.`Couple`='0' OR `Profiles`.`Couple`>`Profiles`.`ID`) AND `Profiles`.`Status` = 'Active'
)

)

[3] => Array
(
[file] => /home/gsmithjr/public_html/browse.php
[line] => 121
[function] => PageCompPageMainCode
[args] => Array
(
)

)

)


Called script: /browse.php

Request parameters:
Array
(
[__utma] => 58368060.2724377460587242000.1241799720.1241816141.1241835766.5
[__utmz] => 58368060.1241799720.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
[__utmb] => 58368060.3.10.1241835766
[__utmc] => 58368060
[_csuid] => 49f9e81a4b735325
[memberID] => 2
[memberPassword] => 1f92cc4314f273c5a3b29e15e0ea75d7
)


--
Auto-report system

Quote · 9 May 2009

its been modified or corrupted

the query says"WHERE  AND" and should only say WHERE

find out why or replace the browse.php

I have video tutorials to help you mrpowless.com
Quote · 9 May 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.