Danny620 Posted December 20, 2009 Share Posted December 20, 2009 i want to create a script that can check whether or not the entered values in a textfiled are greater than the ones in the db like say i entered 100 in textfield 1 and 200 in textfield 2 then the db would check to see wether or not these entered values are more than so it would check the db like 100 in table one would be fine but 195 in table two would return false how do i do this thanks Link to comment https://forums.phpfreaks.com/topic/185818-abit-of-sql-and-php-needed/ Share on other sites More sharing options...
JAY6390 Posted December 20, 2009 Share Posted December 20, 2009 SELECT * FROM table_name WHERE field_name <= 'number_here' Then check the number of rows returned by the query using mysql_num_rows() function Link to comment https://forums.phpfreaks.com/topic/185818-abit-of-sql-and-php-needed/#findComment-981137 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.