View Full Version : [not bug] MySQL Error on editpost
Me2Be
Tue 10th Jul '01, 8:02pm
About once a day I get an error like this:
Database error in vBulletin: Invalid SQL: SELECT postid FROM post WHERE threadid= ORDER BY dateline LIMIT 1
mysql error: You have an error in your SQL syntax near 'ORDER BY dateline LIMIT 1' at line 1
Script: /editpost.php
Any clue why? (It's always on editpost)
Wayne Luke
Tue 10th Jul '01, 10:04pm
It looks like someone is calling the editpost.php file directly. You shouldn't be getting any errors though because there are checks to make sure that the post and its thread actually exist.
Make sure these lines exist at the beginning of your editpost.php file:
// verify postid
$postid = verifyid("post",$postid);
$postinfo=getpostinfo($postid);
if (!$postinfo[visible]) {
$idname="post";
eval("standarderror(\"".gettemplate("error_invalidid")."\");");
}
$threadinfo=getthreadinfo($postinfo[threadid]);
if ($wordwrap!=0) {
$threadinfo[title]=dowordwrap($threadinfo[title]);
}
if (!$threadinfo[visible]) {
$idname="thread";
eval("standarderror(\"".gettemplate("error_invalidid")."\");");
}
Powered by vBulletin™ Version 4.0.0 Beta 4 Copyright © 2009 vBulletin Solutions, Inc. All rights