here is the code I use. notice the LIMIT and OFFSET
so you change the limit to 3 and then do a second query and set the offset to 6 then a 3rd query with the offset set to 9 ect,,
to see an ex. look at my site the news feed menu at the top is built this way. link in my sig. here is the code
<?php
$result = mysql_query("SELECT * FROM dyn_menu where cat='news'LIMIT 8");
while($row = mysql_fetch_array($result))
{
$linky[0] = "$row[links]";
$linky[1] = "$row[link_url]";
$thelinks= "<b><a href='$linky[1]'>$linky[0]</a>,</b> ";
echo"$thelinks";
}
echo"<BR>";
$result = mysql_query("SELECT * FROM dyn_menu where cat='news'LIMIT 8 OFFSET 8");
while($row = mysql_fetch_array($result))
{
$linky[0] = "$row[links]";
$linky[1] = "$row[link_url]";
$thelinks= "<b><a href='$linky[1]'>$linky[0]</a>,</b> ";
echo"$thelinks";
}
echo"<BR>";
?>
__________________
I hope to build a site with something for every body
www.bmcoll.com
|