Thanks - I found it and perhaps you can give me an idea what the error is as I have no programming/php experience
(I have removed any reference to my site name)
Database error in Final test
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 = 2 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/mywebsite.com/public_html/admin/profiles.php
at line 268. Called db_res function
with erroneous argument #0
Debug backtrace:
Array
(
[1] => Array
(
[file] => /mywebsite.com/public_html/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 = 2 AND idProfile = ID AND (`Couple`=0 OR `Couple`>`Profiles`.`ID`)
GROUP BY `Profiles`.`ID`
ORDER BY DateLastLogin
LIMIT 0, 30
)
)
)
Called script: /admin/profiles.php
Request parameters:
Array
(
[showAffMembers] => 2
[sortor] => DateLastLogin
[affID] => 2
[affPassword] => 8115de544f81d70cc53b0c210005469f
[ZP_CAL] => \'fdow\':null,\'history\':\"2008/10/22/09/45,2008/10/21/09/06\",\'sortOrder\':\"asc\",\'hsize\':9
[idAff] => 2
[adminID] => testadmin
[adminPassword] => ccccccccccxxxxxxxxx