Apologies for my lack of scripting skills. I’m trying to adapt a PayPal IPN script to update several tables in one go.
This script works fine: $strQuery2 =
“UPDATE user_usr
SET amt_paid_usr='”.$mc_gross.“’
, paypal_usr='”.$txn_id.“’
, paymentdate_usr='”.$fecha.“’
WHERE invoice_usr='”.$custom.“'”;
"
$result = mysql_query($strQuery2) or die(“Subscription - paypal_subscription_info, Query failed:<br>” . mysql_error() . “<br>” . mysql_errno());
When adding a second query it fails:
“UPDATE user_usr
SET amt_paid_usr='”.$mc_gross.“’
, paypal_usr='”.$txn_id.“’
, paymentdate_usr='”.$fecha.“’
WHERE invoice_usr='”.$custom.“'”;
“UPDATE transactions
SET amt_paid_trn='”.$mc_gross.“’
, paypal_usr='”.$txn_id.“’
, paymentdate_trn='”.$fecha.“’
WHERE '”.$item_name.“’
LIKE ‘%G%’ AND gifter_trn='”.$custom.“'”;
$result = mysql_query($strQuery2) or die(“Subscription - paypal_subscription_info, Query failed:<br>” . mysql_error() . “<br>” . mysql_errno());
I also tried to enclose in quotes rather than two separate sets:
$strQuery2 = “UPDATE user_usr
SET amt_paid_usr='”.$mc_gross.“’
, paypal_usr='”.$txn_id.“’
, paymentdate_usr='”.$fecha.“’
WHERE invoice_usr='”.$custom."';
UPDATE transactions
SET amt_paid_trn=‘“.$mc_gross.”’
, paypal_usr=‘“.$txn_id.”’
, paymentdate_trn=‘“.$fecha.”’
WHERE ‘“.$item_name.”’ LIKE ‘%G%’
AND gifter_trn=‘“.$custom.”’";
$result = mysql_query($strQuery2) or die(“Subscription - paypal_subscription_info, Query failed:<br>” . mysql_error() . “<br>” . mysql_errno());