jeddi
06-16-2009, 11:24 AM
Hi,
I am modifying a script.
At present it looks like this:
$strQuery = "insert into paypal_payment_info(paymentstatus,buyer_email,firstname,lastname,street,city,state,zipcode,country,m c_gross,mc_fee,itemnumber,itemname,os0,on0,os1,on1,quantity,memo,paymenttype,paymentdate,txnid,pendi ngreason,reasoncode,tax,datecreation)
values
('".$payment_status."','".$payer_email."','".$first_name."','".$last_name."','".$address_street."','".$address_city."','".$address_state."','".$address_zip."','".$address_country."','".$mc_gross."','".$mc_fee."','".$item_number."','".$item_name."','".$option_name1."','".$option_selection1."','".$option_name2."','".$option_selection2."','".$quantity."','".$memo."','".$payment_type."','".$payment_date."','".$txn_id."','".$pending_reason."','".$reason_code."','".$tax."','".$fecha."')";
$result = mysql_query($strQuery) or die("Default - paypal_payment_info, Query failed:". mysql_error());
Is there any need for those ". and ."
in this '".$payment_status."','".$payer_email."' ?
I usually just write ('$payment_status', ...
isn't that enough ?
I don't want to re-write this (simplify it ) if there is
a valid reason for the extra code, but if not I'd rather make it easier on the eye.
Any thoughts ?
I am modifying a script.
At present it looks like this:
$strQuery = "insert into paypal_payment_info(paymentstatus,buyer_email,firstname,lastname,street,city,state,zipcode,country,m c_gross,mc_fee,itemnumber,itemname,os0,on0,os1,on1,quantity,memo,paymenttype,paymentdate,txnid,pendi ngreason,reasoncode,tax,datecreation)
values
('".$payment_status."','".$payer_email."','".$first_name."','".$last_name."','".$address_street."','".$address_city."','".$address_state."','".$address_zip."','".$address_country."','".$mc_gross."','".$mc_fee."','".$item_number."','".$item_name."','".$option_name1."','".$option_selection1."','".$option_name2."','".$option_selection2."','".$quantity."','".$memo."','".$payment_type."','".$payment_date."','".$txn_id."','".$pending_reason."','".$reason_code."','".$tax."','".$fecha."')";
$result = mysql_query($strQuery) or die("Default - paypal_payment_info, Query failed:". mysql_error());
Is there any need for those ". and ."
in this '".$payment_status."','".$payer_email."' ?
I usually just write ('$payment_status', ...
isn't that enough ?
I don't want to re-write this (simplify it ) if there is
a valid reason for the extra code, but if not I'd rather make it easier on the eye.
Any thoughts ?