PDA

View Full Version : User File - Plz Help


ExAvIoUr
08-25-2002, 05:14 PM
how do i fix this error? can u plz help me.


Database error in vBulletin Control Panel 2.2.6:

Invalid SQL: SELECT *,FROM_UNIXTIME(joindate) AS joindate,FROM_UNIXTIME(lastvisit) AS lastvisit,FROM_UNIXTIME(lastactivity) AS lastactivity,FROM_UNIXTIME(lastpost) AS lastpost

avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar

FROM user

LEFT JOIN avatar ON avatar.avatarid=user.avatarid

LEFT JOIN customavatar ON customavatar.userid=user.userid

WHERE user.userid=11
mysql error: You have an error in your SQL syntax near 'avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar

' at line 3

mysql error number: 1064

Date: Sunday 25th of August 2002 02:13:57 PM
Script: http://xx.xxx.xx.xx/gsu/gsu/admin/user.php?s=&action=edit&userid=11
Referer: http://xx.xxx.xx.xx/gsu/admin/

ExAvIoUr
08-26-2002, 08:33 PM
ne1

g-force2k2
08-26-2002, 09:15 PM
try adding a comma after lastpost? not sure but its worth a try right ;) regards...

g-force2k2

ExAvIoUr
08-26-2002, 09:55 PM
u r a genius. thanx a lot.

ExAvIoUr
08-26-2002, 09:56 PM
almost a genius.

now i get this

Database error in vBulletin Control Panel 2.2.6:

Invalid SQL: SELECT userid

FROM user

WHERE username='Name'

AND userid <>
mysql error: You have an error in your SQL syntax near '' at line 7

mysql error number: 1064

Boofo
08-26-2002, 11:04 PM
Try changing this:

SELECT *,FROM_UNIXTIME(joindate)

to this:

SELECT user.*,FROM_UNIXTIME(joindate)

ExAvIoUr
08-26-2002, 11:53 PM
i get the same error.:(

Boofo
08-27-2002, 12:06 AM
Post that whole piece of code here and let's look at it.

ExAvIoUr
08-27-2002, 01:51 PM
here it is


$user=$DB_site->query_first("SELECT user.*,FROM_UNIXTIME(joindate) AS joindate,FROM_UNIXTIME(lastvisit) AS lastvisit,FROM_UNIXTIME(lastactivity) AS lastactivity,FROM_UNIXTIME(lastpost) AS lastpost,

avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar

FROM user

LEFT JOIN avatar ON avatar.avatarid=user.avatarid

LEFT JOIN customavatar ON customavatar.userid=user.userid

WHERE user.userid=$userid");

Boofo
08-27-2002, 08:47 PM
Well. you stumped me on this one. That is the exact same piece of code I have and I don't get any errors. g-force2k2, any ideas there, my friend? :)

Scott MacVicar
08-27-2002, 08:54 PM
You havent upgraded to 2.2.6 or above. Make sure you overwrite the /admin/user.php as you are still running an old version.

FYI, this is a bug with the way php that appeared in 4.2.x

g-force2k2
08-27-2002, 09:45 PM
Originally posted by Boofo
Well. you stumped me on this one. That is the exact same piece of code I have and I don't get any errors. g-force2k2, any ideas there, my friend? :)

i think taht are friend PPN just confirmed that it had to do with a previous bug :p thanks PPN ;)

g-force2k2

ExAvIoUr
08-27-2002, 10:09 PM
i installed it as 2.2.6. so thats not that problem. at least i dont think so.

i can pm one of u guys with the whole source code.