Sql query went bonkers!!!
//
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE ticketID=471771' at line 1
//
This is the bytes that are causing my headache...:
//
if(isset($_REQUEST['tab'])){
$tab=$_REQUEST['tab'];
$a2ass=$_REQUEST['a2ass'];
$ticketID=$_REQUEST['ticketID'];
$a2aname=$_REQUEST['a2aname'];
$a2aaddress=$_REQUEST['a2aaddress'];
$a2acity=$_REQUEST['a2acity'];
$a2astate=$_REQUEST['a2astate'];
$a2aphone=$_REQUEST['a2aphone'];
$a2acompany=$_REQUEST['a2acompany'];
$a2aemail=$_REQUEST['a2aemail'];
//************************************************** **************************************Sort by tabs --Buyer
if($tab=="assign_buyer"){
$as="BUYER";
//**** Check for assignee MID and create assignment SQL
if(isset($a2ass)){
ticket_connect();
//**** Execute SQL
mysql_query("INSERT INTO mynewci_ticket (buyer_name,buyer_mid,buyer_email,buyer_phone,buye r_city,buyer_state,buyer_address,buyer_company) VALUES ('$a2aname','$a2ass','$a2aemail','$a2aphone','$a2a city','$a2astate','$a2aaddress','$a2acompany')WHER E ticketID='$ticketID'") or die(mysql_error());
}
//
Anyone have any ideas why it is telling me my syntax is wrong?
I know I dont need to escape my single quote so I cant see what the problem is...
The 2nd Amendment, 1789 - The Original Homeland Security.
Gun control means never having to say, "I missed you."