Page 1 of 1

Problem with update query

Posted: Wed Aug 27, 2003 6:28 pm
by szms
The following query is not updating the database. but it works perfectly in mysql. Any sugeestion???

$result8 = mysql_query("update NonDummyFunction set Count = Count - 1 where Function_ID = 'Component_ID'");

Posted: Wed Aug 27, 2003 7:17 pm
by Stoker
is there ant record in the table NonDummyFunction that has a value in the column `Function_ID` that reads literally "Component_ID" ?

Perhaps you want to remove the quotes around Component_ID ?

Edit/Add: Just a comment to Sami's post; Reading the manual on the UPDATE syntax may not help much here as I believe szms may have missunderstood the difference between literal strings and a reference to another column, likely to be extra confusing with because of the use of standard quotes ' and backquotes `

Posted: Wed Aug 27, 2003 7:59 pm
by m3mn0n