Mmmm...this is literally the last few lines of code I need to complete my PPC plugin! Can anyone see why this won't update?;
$user_links->update ( { Transaction_ID => $txn_id, PayPal_Email => $payer_email, Used => "1" }, { Date => $item_number }, { GT_SQL_SKIP_INDEX => 1 } )
or &error("Error: $GT::SQL::error");
As you can see, I have an 'or' statement in there, which doesn't seem to do anything. The only way I can think of, is that its not running the query, but how could I confirm this?
In my error logs, I have the following;
GT::SQL::Driver::MYSQL::sth (1794): Executing query: UPDATE lsql_PPC_Trans SET Transaction_ID = '4W615465CB7682458' , PayPal_Email = 'andy.newby@ace-installer.com' WHERE Date = 1032625682 from main::do_updates at ppc_paypal.cgi line 116
Should I have quotes around the 'Date' part?
Any help is much appreciated!
BTW: I have tried using Date => \"$item_number" and Date => "$item_number" , but the Date = part still seems to come out without the quotes
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Code:
$user_links = $DB->table('PPC_Trans'); # first grab a new db handle $user_links->update ( { Transaction_ID => $txn_id, PayPal_Email => $payer_email, Used => "1" }, { Date => $item_number }, { GT_SQL_SKIP_INDEX => 1 } )
or &error("Error: $GT::SQL::error");
As you can see, I have an 'or' statement in there, which doesn't seem to do anything. The only way I can think of, is that its not running the query, but how could I confirm this?
In my error logs, I have the following;
GT::SQL::Driver::MYSQL::sth (1794): Executing query: UPDATE lsql_PPC_Trans SET Transaction_ID = '4W615465CB7682458' , PayPal_Email = 'andy.newby@ace-installer.com' WHERE Date = 1032625682 from main::do_updates at ppc_paypal.cgi line 116
Should I have quotes around the 'Date' part?
Any help is much appreciated!
BTW: I have tried using Date => \"$item_number" and Date => "$item_number" , but the Date = part still seems to come out without the quotes
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!