Quote:
Originally Posted by cravendale
I did this and still I get....
Database error in vBulletin 4.0.6:
Invalid SQL:
SELECT * FROM raffle
WHERE startdate <= 1336589218
WHERE enddate > 1336589218
ORDER BY id DESC;
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE enddate > 1336589218
ORDER BY id DESC' at line 3
Error Number : 1064
Request Date : Wednesday, May 9th 2012 @ 01:46:58 PM
Error Date : Wednesday, May 9th 2012 @ 01:46:58 PM
Script : http://www.tappletop.com/forum/raffles.php?do=main
Referrer : http://www.tappletop.com/forum/raffles.php
IP Address : 94.168.182.181
Username : Johnjeffs3
Classname : vB_Database
MySQL Version :
This is when the member clicks the button to enter.
????
|
Edit raffles.php and find this..
Code:
if($_REQUEST['do'] == 'main')
{
require_once(DIR . '/includes/class_bbcode.php');
$parser = new vB_BbCodeParser($vbulletin, fetch_tag_list());
$allow_view = true;
$timenow = TIMENOW;
if($vbulletin->options['raffle_showold'])
{
$oldentryopt = '';
}
else
{
$oldentryopt = "AND enddate > $timenow";
}
$getraffle = $vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "raffle
WHERE startdate <= $timenow
$oldentryopt
ORDER BY id DESC
");
Make sure this part says what I show here...
Code:
$oldentryopt = "AND enddate > $timenow";
NOT
Code:
$oldentryopt = "WHERE enddate > $timenow";
I don't know why your copy would say 'WHERE' but if it does, change it to 'AND'.
If that's not the problem then turn off Show Raffles Already Drawn in raffle settings. I'll have to dig into it to find out why your system has problems with that code.