The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
mysql error
dont know what to do but here is the error
Database error in vBulletin 2.2.5: Invalid SQL: SELECT userid,username FROM user WHERE userid<> AND (usergroupid=5 OR usergroupid=6 OR usergroupid=7 OR usergroupid=2) ORDER BY RAND() LIMIT 1 mysql error: You have an error in your SQL syntax near 'AND (usergroupid=5 OR usergroupid=6 ' at line 4 mysql error number: 1064 |
#2
|
||||
|
||||
Well, the problem is that he doesn't have anything finishing this statement:
userid<> userid is not equal to what? |
#3
|
||||
|
||||
After correcting what Mark has mentioned, check ORDER BY RAND() part too.. This is wrong either..
|
#4
|
|||
|
|||
in the file index.php where it is refering me i see this --
$newmember=$DB_site->query_first("SELECT userid,username FROM user WHERE userid<>$daybits[1] AND (usergroupid=5 OR usergroupid=6 OR usergroupid=7 OR usergroupid=2) ORDER BY RAND() LIMIT 1"); can you guys tell me what you would do? i didnt understand what you meant? |
#5
|
||||
|
||||
That's the hack from firefly: Member of the day
The code is good, could u post the lines above that code starting by "// start member of the day stuff"? |
#6
|
||||
|
||||
Quote:
|
#7
|
|||
|
|||
sure here is the whole member of the day hack i have on my index.php
// start member of the day stuff $thisdate=date('Y-m-d'); $getdaytemplate=$DB_site->query_first("SELECT template FROM template WHERE title='memberoftheday' AND templatesetid=-2"); $daytemplate=$getdaytemplate['template']; $daybits=explode('||vb||',$daytemplate); if ($daybits[0]!=$thisdate or ($resetmember==1 and $bbuserinfo['usergroupid']==6)) { /* This template is either outdated or the admin wants to reset it. Either way, we need to choose a new member of the day. Aren't you excited?! */ $newmember=$DB_site->query_first("SELECT userid,username FROM user WHERE userid<>$daybits[1] AND (usergroupid=5 OR usergroupid=6 OR usergroupid=7 OR usergroupid=2) ORDER BY RAND() LIMIT 1"); $newtemplate=$thisdate.'||vb||'.$newmember['userid'].'||vb||'.$newmember['username']; $DB_site->query("UPDATE template SET template='".addslashes($newtemplate)."' WHERE templatesetid=-2 AND title='memberoftheday'"); $memberoftheday['userid']=$newmember['userid']; $memberoftheday['username']=$newmember['username']; } else { $memberoftheday['userid']=$daybits[1]; $memberoftheday['username']=$daybits[2]; } // end of member of the day stuff |
#8
|
|||
|
|||
oki got this one taken care of
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|