Jump to content

Error in your SQL syntax near..


oskare100

Recommended Posts

Hello,

When I try to run this script I get the error message "You have an error in your SQL syntax near 'where payer_email = '[email protected]'' at line 1" :

[code=php:0]$txn_id = "12345678910";
$payer_email = "[email protected]";

//Connect to MySQL
mysql_connect("localhost", "test", "30053005") or die(mysql_error());

//Select file system database
mysql_select_db("test") or die(mysql_error());

$sql13 = "INSERT INTO paypal_sales (txn_id_refund) VALUES ('$txn_id') where payer_email = '$payer_email'";
$result13 = mysql_query($sql13) or die( mysql_error() );[/code]

I can't figure out what SQL syntax error it's talking about..

Best Regards
Oskar R
Link to comment
https://forums.phpfreaks.com/topic/25632-error-in-your-sql-syntax-near/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.