Re: [PHP-DB] update db with variables

2003-09-24 Thread Robbie Staufer
Thanks to all. Single quotes around '$value' did the trick. Robbie CPT John W. Holmes wrote: From: "Robbie Staufer" <[EMAIL PROTECTED]> I'm writing an application that will display the contents of a db in the browser, including the db-assigned id number. The user can then enter the id numb

Re: [PHP-DB] update db with variables

2003-09-24 Thread Ignatius Reilly
Quotes missing around $value. Try instead: mysql_query( "UPDATE tablename SET {$name} LIKE '{$value}' WHERE ID={$id}") Of course, even though the code does not show, you have properly validated user input before firing this query... HTH Ignatius _ - Original Message -

Re: [PHP-DB] update db with variables

2003-09-24 Thread CPT John W. Holmes
From: "Robbie Staufer" <[EMAIL PROTECTED]> > I'm writing an application that will display the contents of a db in the > browser, including the db-assigned id number. The user can then enter > the id number in a form and the browser will display the record > corresponding to that id number, with t

RE: [PHP-DB] update db with variables

2003-09-24 Thread Griffiths, Daniel
put some single quotes around $value in your SQL statement. -Original Message- From: Robbie Staufer [mailto:[EMAIL PROTECTED] Sent: 24 September 2003 16:21 To: [EMAIL PROTECTED] Subject: [PHP-DB] update db with variables Hi, I'm writing an application that will display the contents of a