How about:
$review = $_POST['review'];
$sql = "SELECT * FROM reviews WHERE review_id = '$id'";
$res = mysql_query($sql) or die ("Query failed: " . mysql_error());
if (mysql_num_rows($res) > 0)
{
$sql_upd = "UPDATE reviews
SET review_text = '$review'
In full agreement here. I scratched my head this morning, then looked up
"INSERT" in the MySQL Docs for a sanity check. It must be an UPDATE
statement to work as indicated below.
David
<< Sorry David Mitchell >>
==
Is that
Is that a syntax supported by MySQL? That is, an INSERT with WHERE clause?
I tried it against Oracle, and it doesn't work (can you imagine how
upsetting it would have been to have learned that, after having worked with
SQL for several years, one can do an update using an INSERT statement?).
I'm pr