konqest Posted May 16, 2008 Share Posted May 16, 2008 Hey guys I am searching for a way to possibly sort an array I am pulling my array here to display everything in this table, but would like to be able to have it only display only issues of a certain status, I have the Status Field set in this database just unsure on how to proceed to display only those certain statuses echo "<form action=\"editIssue.php\" method=\"post\"> <select name = \"issueID\">"; $res = mysql_query("SELECT * FROM issue"); while($row = mysql_fetch_array($res)) echo "<option value=\"" . $row["issueID"] . "\"> " . "\"" . $row["Title"] . "\", Opened: " . $row["OpenedDate"]. "\", </option>"; any help or linking would be appreciated. Thanks Link to comment https://forums.phpfreaks.com/topic/105986-solved-sorting-search-results-in-an-array/ Share on other sites More sharing options...
DarkWater Posted May 16, 2008 Share Posted May 16, 2008 Elaborate a bit more please. Link to comment https://forums.phpfreaks.com/topic/105986-solved-sorting-search-results-in-an-array/#findComment-543185 Share on other sites More sharing options...
Barand Posted May 16, 2008 Share Posted May 16, 2008 Suppose you only want records where status is X or Y $res = mysql_query("SELECT * FROM issue WHERE status in ('X', 'Y') "); Link to comment https://forums.phpfreaks.com/topic/105986-solved-sorting-search-results-in-an-array/#findComment-543199 Share on other sites More sharing options...
konqest Posted May 22, 2008 Author Share Posted May 22, 2008 Awesome, finally got back from Vacation and it works great. Thanks once again! Link to comment https://forums.phpfreaks.com/topic/105986-solved-sorting-search-results-in-an-array/#findComment-547446 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.