Jump to content

Is there something wrong with this query?


orionellis

Recommended Posts

I have a query that will not insert! I know I am doing something wrong but I can't see it.

I suspect it is the query based on the error below.  ::)

 

<?php
mysql_connect("localhost", "root", "fakepassword") or die(mysql_error());
mysql_select_db("orderboard") or die(mysql_error());

// Insert a row of information into the table 
$query = "INSERT INTO order (r_fname, r_lname, r_descript, r_quantity, r_website, r_date, r_status, r_po )  VALUES ('jim',ellis','Pencil Cup','12','www.yahoo.com','12/23','pending','00000')";
mysql_query($query) or die(mysql_error());  
?>

 

Here is the error I am getting:

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 'order (r_fname, r_lname, r_descript, r_quantity, r_website, r_date, r_status, r_' at line 1

Link to comment
https://forums.phpfreaks.com/topic/42053-is-there-something-wrong-with-this-query/
Share on other sites

Frost100, You are a friggin genious man.

 

 

I have posted this problem on several boards and no one could figure it out.

You are the (Wo)man (orionellis bows).

 

Thank you. Thank you. Thank you. Hours and hours of misery have met their end.

 

I am going to start a paypal account today to donate in the future. ;D

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.