Jump to content

Extracting first few rows from sql table column.


moola

Recommended Posts

Hi guys. I'm a newbie and I've tried searching everywhere for an answer to this, but I'm not sure I'm searching right.

Just wondering how I would select the first few rows in an sql table rather than using the while loop (as shown below). What I want to do exactly (if it helps) is to display 3 pieces on information from list_id on line1 and then 2 pieces of information on line 2. Then on the next page... the other 3 and the other 2 (ie traverse the list downwards) From column list_id in table videos. (I'm using http://www.phpfreaks.com/tutorials/147/0.php for pagination. )

[code]while ($list = mysql_fetch_array($getlist)) {
  echo "<tr>";
  echo "<td>{$list['list_id']}</td>";
    echo "</tr>";
} // end while [/code]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.