h3ktlk Posted March 27, 2008 Share Posted March 27, 2008 Tryinging to pull a recordset. This is what i have: mysql_select_db($database_wellness, $wellness); $query_wellnesssessionbcount = "SELECT * FROM sessionb WHERE sessionb.`count`<30"; $wellnesssessionbcount = mysql_query($query_wellnesssessionbcount, $wellness) or die(mysql_error()); $row_wellnesssessionbcount = mysql_fetch_assoc($wellnesssessionbcount); $totalRows_wellnesssessionbcount = mysql_num_rows($wellnesssessionbcount); which works great but for one of the records i need it to be fore <20 not <30 ... is it possible to make an AND statment in there to do that somehow? pertaining to the id of the record possibly? what i have is 12 records.. 11 of them need pulled when count is less then 30 .. 1 of them needs pulled if count is less then 20. Im using the data to fill a drop down menu. Thanks! Link to comment https://forums.phpfreaks.com/topic/98140-need-help/ Share on other sites More sharing options...
ucffool Posted March 28, 2008 Share Posted March 28, 2008 Just pull the record of all the ones that are <30, then when the id is for the record that should be <20, check its value and either process it or toss it out. No big deal to pull 1 extra record from MySQL, just process all 12 with a catch for the special circumstance. Link to comment https://forums.phpfreaks.com/topic/98140-need-help/#findComment-503475 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.