abrahamgarcia27 Posted August 25, 2011 Share Posted August 25, 2011 I have a query that outputs certain values in a table, but i want to put a conditional if statement. What i have right now is if the status is 1 echo Close and if the status is 0 Open what i want it to do now is not to show the values that have 1 along with all the other database table entries how would i do that //if statement for status if($rows['status'] == 1) { $status = "Close"; } else $status = "Open"; ?> Link to comment https://forums.phpfreaks.com/topic/245660-if-statement/ Share on other sites More sharing options...
MasterACE14 Posted August 25, 2011 Share Posted August 25, 2011 $sql = "SELECT field1,field2,field3 WHERE `status`='1'"; Filter the results in the Query. Link to comment https://forums.phpfreaks.com/topic/245660-if-statement/#findComment-1261715 Share on other sites More sharing options...
abrahamgarcia27 Posted August 25, 2011 Author Share Posted August 25, 2011 Thank you Link to comment https://forums.phpfreaks.com/topic/245660-if-statement/#findComment-1261723 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.