I am trying to pull all info from my database and then have it grouped by the Branch field. I need to manually include a header about each Branch. So it would be like
Header1
list1
Header2
list2
etc
I can get
Header1
list1
or
Header1
list1
list2
but I can't get what I am trying to do. I am really new at this, so I am probably missing something simple. This is what I have so far. I've been moving parts all around trying to make things work, so it's probably really wacked by now... thanks for any thoughts.
PHP Code:mysql_pconnect("localhost","***","***");
mysql_select_db("*****");
$result = mysql_query("SELECT * FROM evolinks ORDER BY Branch, Name");
echo "<h2>Portland Emails</h2><br>";
while ($myrow = @mysql_fetch_array($result)) {
if ($myrow["Branch"] == 03) {
echo "<A HREF=mailto:\"",$myrow["email"],"\">",$myrow["Name"];
echo "</A> ","<BR>";
}
}




Reply With Quote

Bookmarks