Help me

Ok im kinda freaked out i didnt made any changes didnt did anything. no uploadings no nothigns. the comunity was workin perfect and the other minute i referesed it gave a red error. database connection failed. and i cannot access it . can't even go to the admin panel . what should i do please help me !! www.fanart-freaks.co.cc here is the link

Quote · 12 Nov 2008

ti started workin bck to normall it self. can anyone guide me what is happenign? or is ther any kind of problem with my databse or anything. BTW i received this email from my community showing this coding i have no idea wht it ise

Database error in Fan Art Freaks -- Anime Fan Art -- Celebrity Fan Art
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 535. Called db_res function
with erroneous argument #0

Debug backtrace:
Array
(
[1] => Array
(
[file] => /home/goku/public_html/dolphin/admin/profiles.php
[line] => 535
[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
[sortor] => DateLastLogin
[memberID] => 1
[memberPassword] => a43fddc267cc105464626f74e190b903
[adminID] => webmaster
[adminPassword] =>
)


Quote · 12 Nov 2008

basically that query is crap, the error would need a 'fix' here:

AND idAff = 4 AND idProfile = ID

to:

AND idAff = 4 AND idProfile = Profiles.ID

but overall the query would need a complete rewrite :) It dosn't follow standards nor common sence...

Also this bit: WHERE 1   AND idAff = 4

looks like a SQL injection to me, I mean why would a query have a WHERE 1 AND.... as 1 is always true :)

Quote · 12 Nov 2008

ohh boy!!! buddy  i know nuthing about coding or php or whtever!!! :( please make it easier for me i want fix it up. coz im receiveing databse error continously in my mail box :( what should i do

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