Let me be more specific, maybe it'll help ungarble what I meant. Say you have a table of movie records, with TITLE and FORMAT being two of the fields. You want to query for those two fields, and display, grouped by format, rather like this:
DVD
-The Matrix
-Ghostbusters
VHS
-Howard the Duck
BETA
-Killer Klowns from Outer Space
Not a real example, mind you, but you get the point. The first way that occured to me to do it was something like
echo("<strong>DVD</strong> <ul>");
while($row=mysql_fetch_array($result)){
if($row["Format"]=="DVD"){
echo("<li> . $row[Title"] ."</li>");
}
echo("</ul>");
echo("<strong>VHS</strong> <ul>");
while($row=mysql_fetch_array($result)){
if($row["Format"]=="VHS"){
echo("<li> . $row[Title"] ."</li>");
}
echo("</ul>");
...etc. Problem is, that would only display the DVD titles, because the $result array is at the end. So, you could make it work by running the query multiple times for different variables [($result0=@("SELECT Title, Format FROM blah"); ($result1=@("SELECT Title, Format FROM blah"); ] and using a different variable for each while loop, but that seems excessively wasteful. So, is there a way to display results like that in the current framework, or would it have to be done in the SQL statement itself (or, am I just way off base here)? Thanks