Ok...I'm getting there :D I now have a UniqueAutoIncrementing field called SetID. I've got the following 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 }, { SetID => "$item_number" }, { GT_SQL_SKIP_INDEX => 1 } )
or &error("Error: $GT::SQL::error");
And in my error logs I get;
GT::SQL::Driver::MYSQL::sth (13259): Executing query: UPDATE lsql_PPC_Trans SET Transaction_ID = '9JC32187PN230270F' , PayPal_Email = 'andy.newby@ace-installer.com' from main::do_updates at ppc_paypal.cgi line 117
As you can see, the 'Used' field is set to 0 still...and in the query, located inred, it doesn't actually get even defined in the query.
I have tried;
Used => '1'
Used => "1"
Used => \"1"
Used => \'1'
and none of them seem to work...anyone got any ideas?
Cheers
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:
# ok, everything seems fine here, lets update the database, and also prefix_Users with their new purchase... $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 }, { SetID => "$item_number" }, { GT_SQL_SKIP_INDEX => 1 } )
or &error("Error: $GT::SQL::error");
And in my error logs I get;
Quote:
GT::SQL::Driver::MYSQL::sth (13259): Executing query: SELECT Transaction_ID,Date,PayPal_Email,Used FROM lsql_PPC_Trans WHERE SetID = 16 from main::do_updates at ppc_paypal.cgi line 117 GT::SQL::Driver::MYSQL::sth (13259): Executing query: UPDATE lsql_PPC_Trans SET Transaction_ID = '9JC32187PN230270F' , PayPal_Email = 'andy.newby@ace-installer.com' from main::do_updates at ppc_paypal.cgi line 117
As you can see, the 'Used' field is set to 0 still...and in the query, located inred, it doesn't actually get even defined in the query.
I have tried;
Used => '1'
Used => "1"
Used => \"1"
Used => \'1'
and none of them seem to work...anyone got any ideas?
Cheers
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!