Stretch Posted March 21, 2007 Share Posted March 21, 2007 What i want to do is raise the value of "number" in each feild when the script is called in a browser or chron job this doesnt seem to work, in a noob. any help please? <? #connection $sql="select `number`, `id` from table ORDER BY `id` DESC "; $res = mysql_query($sql) or die(mysql_error()); while ($line = mysql_fetch_array($res)); { $turns = $line['turns']; $id = $line['id']; echo $id . '-' . $turns; } ?> Link to comment https://forums.phpfreaks.com/topic/43605-help-raise-the-value-of-number-in-each-feild/ Share on other sites More sharing options...
AndyB Posted March 21, 2007 Share Posted March 21, 2007 Do you mean you want to increment the value of the field named number in every row of the table? Link to comment https://forums.phpfreaks.com/topic/43605-help-raise-the-value-of-number-in-each-feild/#findComment-211788 Share on other sites More sharing options...
Stretch Posted March 21, 2007 Author Share Posted March 21, 2007 yes, its for a turn based game... i just want, like 100 turns added to the users account every time the script is called. Link to comment https://forums.phpfreaks.com/topic/43605-help-raise-the-value-of-number-in-each-feild/#findComment-211789 Share on other sites More sharing options...
fenway Posted March 21, 2007 Share Posted March 21, 2007 Like UPDATE whateverTable set column = column + 100 WHERE ...? Link to comment https://forums.phpfreaks.com/topic/43605-help-raise-the-value-of-number-in-each-feild/#findComment-212237 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.