It seems like I poorly explained my trouble. Ok, if n = 100000, fetch'n'skip will be very slow. So, as I understood, there are no way to get n-th article from topic. It's a pity.
-----Original Message----- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Alexey Zakhlestine Sent: Thursday, January 15, 2004 3:19 PM To: [EMAIL PROTECTED] Subject: [midgard-user] Re: fetch n-th article from topic Ruslan Skripka wrote: > Hi, guys. > > I stuck on getting n-th article from topic. > > I have a topic with huge amount of articles. > > I want only number 30 to 50 articles for example. > > Can I do that using midgard API, without getting down to mysql layer? if ($list = mgd_list_topic_articles($topic_id)) { $i = 0; while ($list->fetch()) { if ($i++ < 30) { continue; } if ($i > 50) { break; } echo $list->title."<br>\n"; } unset($list, $i); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
