[thelist] mysql help
der wert
derwert at hotmail.com
Sun Oct 1 18:42:08 CDT 2006
This should help you in getting started
$sql = 'SELECT DISTINCT category FROM info ORDER BY category;';
$result = mysql_query($sql) or die('There are currently no links in the
database.');
while ($row = mysql_fetch_assoc($result)){
echo '<div class="left"><h1>'.$row['category'].'</h1><ul>';
$sql2 = 'SELECT * FROM info WHERE category="'.$row['category'].'" ORDER BY
title;';
$result2 = mysql_query($sql2);
while ($row2 = mysql_fetch_assoc($result2)){
echo '<li><a href="'.$row2['url'].'"
target="_blank">'.$row2['title'].'</a></li>';
}
echo '</ul></div>';
}
_________________________________________________________________
The next generation of Searchsay hello!
http://imagine-windowslive.com/minisites/searchlaunch/?locale=en-us&FORM=WLMTAG
More information about the thelist
mailing list