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]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.