Hello all,
I'm having trouble updating a row in my database via a form. Here's a snippet of what I'm trying to do:
$update = "UPDATE table1 SET (name, home_addy) = ('$_POST[name]', '$_POST[home_addy]') WHERE name = '$_POST[name]');
$execUpdate = pg_query($connection, $update);
I get an error saying that there's a parse error. I've traced this error to the "WHERE" clause. For some reason, it's not picking up the name entered from the previous form. Anyone have any ideas?
Thanks,
Jisoo22
I'm having trouble updating a row in my database via a form. Here's a snippet of what I'm trying to do:
$update = "UPDATE table1 SET (name, home_addy) = ('$_POST[name]', '$_POST[home_addy]') WHERE name = '$_POST[name]');
$execUpdate = pg_query($connection, $update);
I get an error saying that there's a parse error. I've traced this error to the "WHERE" clause. For some reason, it's not picking up the name entered from the previous form. Anyone have any ideas?
Thanks,
Jisoo22