vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Add-On Releases - vBulletin Raffles (https://vborg.vbsupport.ru/showthread.php?t=262901)

nhawk 05-05-2012 04:44 PM

Quote:

Originally Posted by oddmud (Post 2326498)
Didn't do anything when I manually drew it. Nothing happened. I just deleted it, and started a new one.

I had to use random.org to pick a winning ticket number. :|

What version of vBulletin are you running?

My site draws a winner every day using vB 4.1.11 and has done so with every version from 4.0.4 forward.

cravendale 05-06-2012 01:44 PM

Hi,

I'm running vB 4.0.6 so I'm also running an older version of Raffles.

When a member entered the Raffle. They get a DB error and this is what I get in email...

Database error in vBulletin 4.0.6:

Invalid SQL:
SELECT * FROM raffle
WHERE startdate <= 1336313626
WHERE enddate > 1336313626
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 > 1336313626
ORDER BY id DESC' at line 3
Error Number : 1064
Request Date : Sunday, May 6th 2012 @ 09:13:46 AM
Error Date : Sunday, May 6th 2012 @ 09:13:46 AM
Script : http://www.twofoursix/forum/raffles.php?do=main
Referrer : http://www.twofoursix.com/forum/raffles.php
IP Address : 77.101.70.149
Username : superjoe
Classname : vB_Database
MySQL Version :

The member appears in the list of members who entered. How can I resolve this error please?

thanks

nhawk 05-06-2012 03:43 PM

Quote:

Originally Posted by cravendale (Post 2326738)
Hi,

I'm running vB 4.0.6 so I'm also running an older version of Raffles.

When a member entered the Raffle. They get a DB error and this is what I get in email...

Database error in vBulletin 4.0.6:

Invalid SQL:
SELECT * FROM raffle
WHERE startdate <= 1336313626
WHERE enddate > 1336313626
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 > 1336313626
ORDER BY id DESC' at line 3
Error Number : 1064
Request Date : Sunday, May 6th 2012 @ 09:13:46 AM
Error Date : Sunday, May 6th 2012 @ 09:13:46 AM
Script : http://www.twofoursix/forum/raffles.php?do=main
Referrer : http://www.twofoursix.com/forum/raffles.php
IP Address : 77.101.70.149
Username : superjoe
Classname : vB_Database
MySQL Version :

The member appears in the list of members who entered. How can I resolve this error please?

thanks

Update raffles to the latest version.

wilford brimley 05-07-2012 06:25 PM

how can I make all users able to see raffle rules instead of just allowed usergroups? I want to be able to tell them how to join the usergroup in the rules.

nhawk 05-07-2012 08:55 PM

Quote:

Originally Posted by wilford brimley (Post 2327127)
how can I make all users able to see raffle rules instead of just allowed usergroups? I want to be able to tell them how to join the usergroup in the rules.

Rules won't show up for anyone except allowed usergroups.

Put the instructions about how to join in the raffle description.

oddmud 05-09-2012 12:11 AM

Quote:

Originally Posted by nhawk (Post 2326521)
What version of vBulletin are you running?

My site draws a winner every day using vB 4.1.11 and has done so with every version from 4.0.4 forward.


v4.1.12 PL1

I understand yours does, but there's a glitch or something going on. I did just fine up until this last draw, and it just didn't.

cravendale 05-09-2012 05:50 PM

Quote:

Originally Posted by nhawk (Post 2326783)
Update raffles to the latest version.

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.
????

nhawk 05-10-2012 12:21 PM

Quote:

Originally Posted by cravendale (Post 2327801)
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.

cravendale 05-10-2012 09:54 PM

Hi,

The code you mentioned to change was already correct in my existing raffles.php file....
Code:

        else
        {
                $oldentryopt = "WHERE enddate > $timenow";
        }
       
        $getraffle = $vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "raffle
                WHERE startdate <= $timenow
                $oldentryopt
                ORDER BY id DESC

I've just checked the " turn off Show Raffles Already Drawn in raffle settings" and it's already turned off and was never on at the point this error was generated.


Quote:

Originally Posted by nhawk (Post 2328001)
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.


nhawk 05-11-2012 05:51 PM

Quote:

Originally Posted by cravendale (Post 2328212)
Hi,

The code you mentioned to change was already correct in my existing raffles.php file....
Code:

        else
        {
                $oldentryopt = "WHERE enddate > $timenow";
        }
       
        $getraffle = $vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "raffle
                WHERE startdate <= $timenow
                $oldentryopt
                ORDER BY id DESC

I've just checked the " turn off Show Raffles Already Drawn in raffle settings" and it's already turned off and was never on at the point this error was generated.

It is NOT correct. The part I highlight in red and is bold should be AND, not WHERE


All times are GMT. The time now is 11:35 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01721 seconds
  • Memory Usage 1,771KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete