Re: [PHP] Parse Error on SQL Insert [Solved]

2006-04-08 Thread Tom Chubb
the field in the DB isn't numeric this would be > > '{$_POST['model']}' > > > > Dan > > > > --- > > http://chrome.me.uk > > > > > > -Original Message- > > From: Joe Henry [mailto:[

Re: [PHP] Parse Error on SQL Insert

2006-04-07 Thread Joe Henry
field in the DB isn't numeric this would be > '{$_POST['model']}' > > Dan > > --- > http://chrome.me.uk > > > -Original Message- > From: Joe Henry [mailto:[EMAIL PROTECTED] > Sent: 07 April 2006 20:53 > To: php-gener

Re: [PHP] Parse Error on SQL Insert

2006-04-07 Thread Satyam
e" <[EMAIL PROTECTED]> To: "'Joe Henry'" <[EMAIL PROTECTED]>; ; <[EMAIL PROTECTED]> Sent: Friday, April 07, 2006 9:56 PM Subject: RE: [PHP] Parse Error on SQL Insert Backticks (`) encapsulate table or database names I was thinking maybe if t

Re: [PHP] Parse Error on SQL Insert

2006-04-07 Thread Ray Hauge
On Friday 07 April 2006 12:56, Chrome wrote: > Of course if the field in the DB isn't numeric this would be > '{$_POST['model']}' > > Dan That's what I was thinking. Even if data is a number, I still generally put quotes around it to make sure I don't have an issue. -- Ray Hauge Programmer/Sys

Re: [PHP] Parse Error on SQL Insert

2006-04-07 Thread John Nichel
Tom Chubb wrote: Complete code... $insertSQL = "INSERT INTO cars (model, `year`, details, price, image1, image2, image3, forsale) VALUES ($_POST['model'], $_POST['year'], $_POST['details'], $_POST['price'], $_FILE['image']['name'][0], $_FILE['image']['name'][1], $_FILE['image']['name'][2], $

Re: [PHP] Parse Error on SQL Insert

2006-04-07 Thread Brad Bonkoski
thanks for the clarification, I guess the other solution would be to avoid using names with special meaning for column names... -B Ray Hauge wrote: On Friday 07 April 2006 12:53, Joe Henry wrote: On Friday 07 April 2006 1:37 pm, Tom Chubb wrote: $insertSQL = "INSERT INTO cars (model,

RE: [PHP] Parse Error on SQL Insert

2006-04-07 Thread Chrome
#x27;]}' Dan --- http://chrome.me.uk -Original Message- From: Joe Henry [mailto:[EMAIL PROTECTED] Sent: 07 April 2006 20:53 To: php-general@lists.php.net; [EMAIL PROTECTED] Subject: Re: [PHP] Parse Error on SQL Insert On Friday 07 April 2006 1:37 pm, Tom Chubb wrote: &

Re: [PHP] Parse Error on SQL Insert

2006-04-07 Thread Ray Hauge
On Friday 07 April 2006 12:53, Joe Henry wrote: > On Friday 07 April 2006 1:37 pm, Tom Chubb wrote: > > $insertSQL = "INSERT INTO cars (model, `year`, details, price, image1, > > Not sure if this is your problem, but those look like backticks around year > instead of single quotes. Should there eve

Re: [PHP] Parse Error on SQL Insert

2006-04-07 Thread Tom Chubb
Complete code... http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1999/xhtml";> Untitled Document Model: Year: Details: Price: Image1:

Re: [PHP] Parse Error on SQL Insert

2006-04-07 Thread Joe Henry
On Friday 07 April 2006 1:37 pm, Tom Chubb wrote: > $insertSQL = "INSERT INTO cars (model, `year`, details, price, image1, Not sure if this is your problem, but those look like backticks around year instead of single quotes. Should there even be quotes there? HTH -- Joe Henry www.celebrityacces

Re: [PHP] Parse Error on SQL Insert

2006-04-07 Thread Brad Bonkoski
why do you have single quotes around year? -B Tom Chubb wrote: I'm working on an insert record page with a multiple file upload script of which I understand the fundamentals. However, on submission I am getting the following error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPAC

Re: [PHP] Parse Error on SQL Insert

2006-04-07 Thread John Nichel
Tom Chubb wrote: I'm working on an insert record page with a multiple file upload script of which I understand the fundamentals. However, on submission I am getting the following error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STR