PDA

View Full Version : [fixed] mysql error in moderate new user template?


eva2000
Tue 31st Jul '01, 2:56am
i upgraded from 2.0.0 to 2.0.2 and have 2 users awaiting me to approve their registration on the admin index page

i click the url and get

There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience.

Database error in vBulletin Control Panel: Invalid SQL: SELECT template FROM template WHERE title='email_validated' WHERE templatesetid=-1 OR templatesetid=1 ORDER BY templatesetid DESC
mysql error: You have an error in your SQL syntax near 'WHERE templatesetid=-1 OR templatesetid=1 ORDER BY templatesetid DESC' at line 1
mysql error number: 1064
Date: Tuesday 31st of July 2001 12:53:35 AM
Script: /admin/user.php?s=&action=moderate
Referer: ************


??

tubedogg
Tue 31st Jul '01, 3:35am
Easy fix. :)
Line 1169 in user.php, replace what's there with
$gettemp=$DB_site->query_first("SELECT template FROM template WHERE title='email_validated' AND (templatesetid=-1 OR templatesetid=1) ORDER BY templatesetid DESC"); //kludgy!!

eva2000
Tue 31st Jul '01, 3:41am
great fixed the error but something funny happened, the email_validated template on that page shows the html/code of a different template in the textarea field :eek:

screen cap

Kier
Tue 31st Jul '01, 3:47am
Tsk, Kevin... giving eva the wrong query again?

$gettemp=$DB_site->query_first("
SELECT template FROM template
WHERE title='email_validated' AND (templatesetid=-1 OR templatesetid=1)
ORDER BY templatesetid DESC");

DarkReaper
Sun 23rd Sep '01, 1:59am
Originally posted by Kier
Tsk, Kevin... giving eva the wrong query again?

$gettemp=$DB_site->query_first("
SELECT template FROM template
WHERE title='email_validated' AND (templatesetid=-1 OR templatesetid=1)
ORDER BY templatesetid DESC");

Oh no, a comment is going to change everything! ;)