moisesbr Posted October 21, 2013 Share Posted October 21, 2013 Hi I would like to increment chave Nei column with +1 in table controle, every time an event happens. I tryied command below but it results error: result = mysql_query("UPDATE controle set chave_nei= chave_nei + 1") ; Moises Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted October 21, 2013 Share Posted October 21, 2013 but it results error: OK Quote Link to comment Share on other sites More sharing options...
cyberRobot Posted October 22, 2013 Share Posted October 22, 2013 (edited) Is the error caused by the missing "$" before "result"? <?php $result = mysql_query("UPDATE controle set chave_nei= chave_nei + 1"); ?> If not, what is the error you are receiving? Side note: the mysql_ functions have been depreciated. If you're not doing so already, you should start looking into the alternatives: http://www.php.net/manual/en/mysqlinfo.api.choosing.php Edited October 22, 2013 by cyberRobot Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.