Re: [PHP] Update statement sent by PHP to MySQL

2001-05-11 Thread Johannes Janson
Hi, > update $T1 set caption = $caption where name = $name put single quotes aroud the variables: caption='$caption'. You can do this aswell: $result = mysql_query("UPDATE $T1 SET caption='$caption WHERE name='$name'", $DB) or die(mysql_error()); if (! $result) { send the haeder... } hope it

[PHP] Update statement sent by PHP to MySQL

2001-05-11 Thread Andreas Pucko
Hi there, I am trying to update a row in my MySQL database (I am an newbie) It does not work, but the DB does not return an error. Is there an error in the syntax?? // Create the user record //-- -

Re: [PHP] update statement

2001-05-11 Thread Johannes Janson
Hi, >I got a series of string value in this format ie: 1,2,3, say pretend that these are telephone number, which is one feild >in user table. >I need to update this telephone number field, I got 3 user ID in series like this too, ie: 3,4,5 and normally it is like > >update set where userID I

[PHP] update statement

2001-05-10 Thread Jacky
I got a series of string value in this format ie: 1,2,3, say pretend that these are telephone number, which is one feild in user table. I need to update this telephone number field, I got 3 user ID in series like this too, ie: 3,4,5 and normally it is like update set where userID IN (3,4

Re: [PHP] Update statement?:SOLVED

2001-04-30 Thread Kurth Bemis
At 01:03 PM 4/30/2001, Steve Werby wrote: I hate the letter "i" :-) it was missing when i passed quantity to the function ~kurth >"Kurth Bemis" <[EMAIL PROTECTED]> wrote: > > function modify_quantity($table, $session, $itemid, $quantity) > > { > > $sql = "UPDATE $table SET quantity='$quantity'

Re: [PHP] Update statement?

2001-04-30 Thread Steve Werby
"Kurth Bemis" <[EMAIL PROTECTED]> wrote: > function modify_quantity($table, $session, $itemid, $quantity) > { > $sql = "UPDATE $table SET quantity='$quantity' WHERE session='$session' > AND itemid='$itemid'"; > mysql_query("$sql"); Add 'echo $sql;' here (no quotes) and look at the output. If the

[PHP] Update statement?

2001-04-30 Thread Kurth Bemis
hey i'm working on a shopping cart..but have hit a snag whit this statement.. function modify_quantity($table, $session, $itemid, $quantity) { $sql = "UPDATE $table SET quantity='$quantity' WHERE session='$session' AND itemid='$itemid'"; mysql_query("$sql