Jump to content

"You have an error in your SQL syntax" but can't find it!


oskare100

Recommended Posts

Hello,
I get this error message "You have an error in your SQL syntax" but I can't find anything wrong with my code.

Here is the problem:
[code=php:0]$sql45="INSERT INTO $user_tbl (username, password, ebay_username, ebay_status, ebay_email, paypal_status, paypal_email, num_purchases, business, first_name, last_name, address_street, address_city, address_state, address_zip, address_country, address_status, created) VALUES ($payer_email, $password, $auction_buyer_id, $ebay_status, , $ebay_email, $payer_status, $payer_email, 1, $business, $first_name, $last_name, $address_street, $address_city, $address_state, $address_zip, $address_country, $address_status, NOW())";
$result45=mysql_query($sql45) or die( mysql_error() );[/code]

Could you please take a look at it and see if you can find anything?

Best Regards
Oskar R
Link to comment
Share on other sites

Hello,
That solved the problem, but now I get the same error with this code:
[code=php:0]// It is a file pack
$sql46="INSERT INTO $sales_tbl (user_id, pack_id, ebay_item_name, ebay_item_id, ebay_txn_id, shipped_marked, paid_marked, payment_status, payment_date, payment_gross, payment_tax, payment_currency, payment_type, paypal_txn_id, paypal_memo, auction_closing_date, auction_multi_item, received) ) VALUES('".$row['user_id']."', '".$ident_row['pack_id']."', '$item_name', '$item_number', '$ebay_transaction_id', '$shipped_marked', '$paid_marked', '$payment_status', '$payment_date', '$mc_gross', '$tax', '$mc_currency', '$payment_type', '$txn_id', '$memo', '$auction_closing_date', '$auction_multi_item')";
$result46=mysql_query($sql46) or die( mysql_error() );[/code]

And it didn't help to add single quotas to it.. Can you see anything else with it?

Thanks in advance,
Oskar R
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.