Status
Not open for further replies.

xandyx

Member
14
2011
0
0
I Am very interested in using vBulletin Raffles v1.0.6 Together With The AWCoding- Credit Purchase SystemWhich Cory Kindly Linked For Me.

The Problem Is The Credit Purchase System Is Not Adding The Credit...

I Get This Error:
Invalid SQL:

UPDATE ``
SET = + 1
WHERE = 2;

MySQL Error : Incorrect table name ''
Error Number : 1103
Request Date : Thursday, May 12th 2011 @ 04:45:52 PM
Error Date : Thursday, May 12th 2011 @ 04:45:53 PM
Script : ge-xtreme.com/admincp/awcl_admin.php?do=transadd_update
Referrer : ge-xtreme.com/admincp/awcl_admin.php?do=transadd&sid=cpsl


This Is The Same Error That Others Have Using The Mod:
http://www.vbulletin.org/forum/showpost.php?p=2159031&postcount=12

I Have Set The Custom 1 As Suggested ::

Credit Purchase System -> Purchase Settings:
Units = 1
Custom Table = user
Custom Field = raffletickets
Custom User Field = userid

I Notice That The Member @ http://www.vbulletin.org/forum/showpost.php?p=2159031&postcount=12 Managed To Fix This By Adding The Missing Variable Calls.


I'm Presuming The Error Is Here:

case 1:

$vbulletin->db->query_write("
UPDATE `$custom_table`
SET $custom_field = $custom_field + $units
WHERE $custom_user_field = ".$AWCL['IN']['userid']
);
break;


Could Someone Please Help Me Fix This Error.
 
Last edited:
2 comments
Thankyou Piracy King I Am Using 4.1.3

...Although Its Took Me A While I Figured It Out You May Know Of A Better Way But Here Is How I Managed To Get It Working...

For Others Who Use Both Mods Together,
This Is The Changes I Made To product-cpsl.xml ::

Code:
case 1:
                    
                        $vbulletin->db->query_write("
                            UPDATE `$custom_table` 
                            SET $custom_field = $custom_field + $units 
                            WHERE $custom_user_field = ".$AWCL['IN']['userid']
                        ); 
                    break;


Changed To ::

Code:
case 1:
                    
                        $vbulletin->db->query_write("
                            UPDATE `".TABLE_PREFIX."user`
                            SET raffletickets = raffletickets + $units 
                            WHERE userid = ".$AWCL['IN']['userid']
                        ); 
                    break;



Further Down Changed To::

Code:
case 1:
                    
                        $vbulletin->db->query_write("
                            UPDATE `".TABLE_PREFIX."user` 
                            SET raffletickets = raffletickets - $units 
                            WHERE userid = ".$payment_info['userid']
                        ); 
                    break;


Then To Avoid The Database Error When Confirming The Transaction ::

Credit Purchase System -> Purchase Settings:
Units = 1
Custom Table = vb_user (obviously Change To Your Own Prefix)
Custom Field = raffletickets
Custom User Field = userid


It Is Now Running Absolutely Fine!

Hope My Initial Uselessness Helps Others ;)
 
Status
Not open for further replies.
Back
Top