Affiliate error

hello, im facing a problem that when ever  i click to see the member's recurited by any affiliate through admin panel it display dtabase query error and also generate database eror email to my account. please help what should i do to fix it?

Quote · 7 Nov 2008

first of all open your /inc/db.inc.php

find line

define( 'DB_FULL_DEBUG_MODE', false );

and change false to true.

After it save and try to open page with error message - you will find a reason of error.

Regards

Artur

Quote · 10 Nov 2008

ok i have no idea what does this means. this si the report

Database query error
Query:
SELECT `Profiles`.`ID` as `ID`, `NickName`, `Email`, `Sex`, DATE_FORMAT(`DateLastLogin`, '%m-%d-%y %H:%i' ) AS `DateLastLoginCur`, DATE_FORMAT(`DateReg`, '%m-%d-%y %H:%i' ) AS `DateReg`, `Status` , `IDLevel`, IF(ISNULL(`MemLevels`.`Name`),'', `MemLevels`.`Name`) AS `MemName` FROM `Profiles` ,aff_members LEFT JOIN `ProfileMemLevels` ON `ProfileMemLevels`.`IDMember` = `Profiles`.`ID` LEFT JOIN `MemLevels` ON `ProfileMemLevels`.`IDLevel` = `MemLevels`.`ID` WHERE 1 AND idAff = 4 AND idProfile = ID AND (`Couple`=0 OR `Couple`>`Profiles`.`ID`) GROUP BY `Profiles`.`ID` ORDER BY DateLastLogin LIMIT 0, 30

Mysql error:
Column 'ID' in where clause is ambiguous

Found error in file /home/goku/public_html/dolphin/admin/profiles.php
at line 268. Called db_res function with erroneous argument #0

Debug backtrace:
Array
(
[1] => Array
(
[file] => /home/goku/public_html/dolphin/admin/profiles.php
[line] => 268
[function] => db_res
[args] => Array
(
[0] =>
SELECT
`Profiles`.`ID` as `ID`,
`NickName`,
`Email`,
`Sex`,
DATE_FORMAT(`DateLastLogin`, '%m-%d-%y %H:%i' ) AS `DateLastLoginCur`,
DATE_FORMAT(`DateReg`, '%m-%d-%y %H:%i' ) AS `DateReg`,
`Status`
, `IDLevel`, IF(ISNULL(`MemLevels`.`Name`),'', `MemLevels`.`Name`) AS `MemName`
FROM `Profiles`
,aff_members

LEFT JOIN `ProfileMemLevels` ON `ProfileMemLevels`.`IDMember` = `Profiles`.`ID`
LEFT JOIN `MemLevels` ON `ProfileMemLevels`.`IDLevel` = `MemLevels`.`ID`
WHERE
1 AND idAff = 4 AND idProfile = ID AND (`Couple`=0 OR `Couple`>`Profiles`.`ID`)

GROUP BY `Profiles`.`ID`
ORDER BY DateLastLogin
LIMIT 0, 30

)

)

)
Called script: /dolphin/admin/profiles.php
Request parameters:
Array
(
[showAffMembers] => 4
[__utma] => 1805863.1849440664.1226249326.1226249326.1226249326.1
[__utmb] => 1805863.15.10.1226249326
[__utmc] => 1805863
[__utmz] => 1805863.1226249339.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
[moderatorID] => administra
[moderatorPassword] => a43fddc267cc105464626f74e190b903
[memberID] => 1
[memberPassword] => a43fddc267cc105464626f74e190b903
[adminID] => webmaster
[adminPassword] => a43fddc267cc105464626f74e190b903
)
Quote · 10 Nov 2008

OMG pleae help me. after debugin and giving u the report. i turned it to true again coz users werent able to see the site. and now database connect failed is coming to the main page. what to do please answer fast

Quote · 10 Nov 2008

Seems this questions asked before,

so - I repeat answer:

line 125 in admin/profiles.php

should be

$aff_part_w = " AND `idAff` = '{$showAffMembers}' AND `idProfile` = `Profiles`.`ID`";

Quote · 11 Nov 2008

Seems this questions asked before,

so - I repeat answer:

line 125 in admin/profiles.php

should be

$aff_part_w = " AND `idAff` = '{$showAffMembers}' AND `idProfile` = `Profiles`.`ID`";

are  u sure about the line number?? coz this is the line whcih i see on 125

db_res( "UPDATE `Profiles` SET `Status` = 'Approval' WHERE `ID` = '" . (int)$val . "'" );

beacause its not workin still. and to clarify im talkin about the member's which affiliates brought in the community. or u can say which they recurited.

Quote · 11 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.