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
https://forums.phpfreaks.com/topic/19636-mysql_fetch_array/#findComment-85528
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
https://forums.phpfreaks.com/topic/19636-mysql_fetch_array/#findComment-85536
Share on other sites

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.