I have advanced immensely since the last time I required the services of the warriors. But alas I find myself in need with yet another trivial problem. This time my SQL statement is giving me a bit of trouble... I have checked and made sure all of the information is getting to the SQL statement but for some reason i get this sql error: //
Sql query went bonkers!!!
16
I have advanced immensely since the last time I required the services of the warriors. But alas I find myself in need with yet another trivial problem. This time my SQL statement is giving me a bit of trouble... I have checked and made sure all of the information is getting to the SQL statement but for some reason i get this sql error:
//
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...
//
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...
- PHPSpaZ
- Mirque
- [1] reply
- PHPSpaZ
- Mirque
- [1] reply
- PHPSpaZ
- Mirque
- Mirque
- [1] reply
- PHPSpaZ
- Mirque
- [ 1 ] Thanks
- JohnnyS
- [ 1 ] Thanks
- KirkMcD
- [ 1 ] Thanks
- [1] reply
- PHPSpaZ
- SteveJohnson
- [ 1 ] Thanks
- [1] reply
- PHPSpaZ
Next Topics on Trending Feed
-
16