Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Going Crazy

Status
Not open for further replies.

9amwhiskey

IS-IT--Management
Sep 6, 2005
52
US
Maybe I'm missing something here, but can anyone see a problem with the following insert syntax:

"INSERT INTO people (name,age,address) VALUES('$name','$age','$address')";

All I get 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 'age,address) VALUES('mike','35','60 Main Street')' at line 1"

Line one is <?PHP

I'm getting really frustrated with how simple this should be
 
just an off thought, have you tried adding a space after the word VALUES?

your data looks fine in this case.
 
data is good i think.....i echo the sql statement and things look fine. tried the space suggestion, unfortunately to no success. this is so odd. at any rate, i appreciate the advice
 
you may be better off in the mysql forum. but for a quickie, post your data schema here
 
Have you tried executing the echoed SQL statement away from PHP?

Clive
Runner_1Revised.gif

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top