markvaughn2006 Posted September 26, 2009 Share Posted September 26, 2009 Is there a way to set a maximum number in a field that is an integer?? example - Field name is Energy, every 15 minutes 1 is added to Energy until 100 is reached. Thanks for any help!! Quote Link to comment Share on other sites More sharing options...
khr2003 Posted September 27, 2009 Share Posted September 27, 2009 is 1 added to the database? then make a query and check the number. $query = mysql_query("Select * from tablename"); $row = mysql_fetch_row($query); if($row['energy'] == 100) { echo "We have reached the maximum entry allowed"; } 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.