Jump to content

mysql_fetch_array


Tandem

Recommended Posts

Thanks for the reply.

Thats not what i meant, i probably should have gone into more detail, sorry about that :P

I'm using a for loop to pull multiple rows from a table and display them in order, via Select * from....etc. But now i need to start the process from a certain row. Is there any way to do that?
Link to comment
Share on other sites

I think you are both misunderstanding me. I'm gonna go into way more depth so you can get more of an uderstanding of where i'm coming from. Sorry for not just doing that in the first place.

Ok. A few months ago i made a message board/forum. I'm now currently trying to make it so that the number of topics displayed on a single page is limited.

To display the topics i use (This is very simplified from the real thing):

[code]
$get_topic_details = mysql_query("SELECT * FROM FORUM");
for ($i = 0 ; $i < $number_of_topics ; $i++) {
$topic_details = mysql_fetch_array($get_topic_details);
echo "$topic_details[1]";
}[/code]

This cycles through the rows., and echo's $topic_details[1] which would be the title or something. But now i want to create different pages showing the topics that have fallen below the top 30, showing 30 topics per page. I want to be able to start the mysql_fetch_array at row 30, or or any other number i may need to start it at. How would i go about this. Please say if you need more detail.
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.