Database query error

When I clicked Members Tab at homepage, it displayed "Database query error".

Help need to fix it.

Thanks.

Jim

Quote · 21 Oct 2008

first of all open /inc/db.inc.php and change

define( 'DB_FULL_DEBUG_MODE', false );

to

define( 'DB_FULL_DEBUG_MODE', true );

After it give us a link to check it up.

Regards

Artur A

Quote · 21 Oct 2008

Thanks.

I did it as your instruction.

Here is my site url.

http://www.5wsplus.com/Dolphin/index.php

Hope you can find why and help me to fix it.

Jim

Quote · 22 Oct 2008

seemed you have made  some changes in browse.php file. Because you have SQL syntax error.

it is your line SELECT COUNT(*) FROM `Profiles` WHERE AND

it should be

SELECT COUNT(*) FROM `Profiles` WHERE {$sql_add} AND

you can change it in ~202 line of your browse.php

Regards

Artur A

Quote · 22 Oct 2008

Hi, ArturA:

I didn't modified any file manually.

All the modifications are made via admin panel.

I cheched the browse.php and found nothing wrong with line 202.

May be the error happened before this line.

I copied some lines near line 202 for you to take a look.

Thanks.

Jim

...........

$sex_add = $sex_add ? '(' . $sex_add . ' 1=0 ) AND ' : '';
$age_add = $age_add ? '(' . $age_add . ' 1=1 )' : '';

$sql_add = $sex_add . $country_add . $age_add . $pic_add . $onl_add . " AND (`Profiles`.`Couple`='0' OR `Profiles`.`Couple`>`Profiles`.`ID`)";


/* this is line 202 */
$p_num = db_arr( "SELECT COUNT(*) FROM `Profiles` WHERE {$sql_add} AND `Profiles`.`Status` = 'Active'" );


$p_num = $p_num[0];
$pages_num = ceil( $p_num / $p_per_page );

$profiles_list_query = "SELECT `ID`, `NickName`, `Sex`, `DateOfBirth`, `Couple` FROM `Profiles` WHERE {$sql_add} AND `Profiles`.`Status`='Active' ORDER BY `Couple` ASC, `Picture` DESC LIMIT {$real_first_p}, {$p_per_page}";

..........

Quote · 24 Oct 2008

hm - strange.

Can you please PM me your FTP access details - so  I will take a look.

Regards

Artur A

Quote · 24 Oct 2008

Hi, Artur A:

What does PM mean here?

Jim

Quote · 26 Oct 2008

Private Message ;-)

Life is a fatal disease, sexually transmissible - Virginity is carcinogenic! Ask here for vaccine.
Quote · 26 Oct 2008

ok - just write to support@boonex.com and mark it - for Artur - it will be enough :)

Regards

Artur

Quote · 27 Oct 2008

Hi, Artur A:

I found that when set

Lowest age possible for site members=0 or

Highest age possible for site members=0

in the advanced settings of admin panel

caused this Data base query error.

Jim

Quote · 6 Nov 2008

it is in Advanced settings

Quote · 6 Nov 2008
 
 
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.