of course u can do this by sql. see this SELECT * FROM `sometable` LIMIT 0 , 30
gives u max 30 records if existstarting at record 0 on the next request u could say SELECT * FROM `sometable` LIMIT 30 , 30 giving u max 30 recotds starting at record 30 ralph ralph_def...@yahoo.de "Nisse Engström" <news.nospam.0ixbt...@luden.se> wrote in message news:eb.35.03345.5f47d...@pb1.pair.com... > On Thu, 6 Aug 2009 12:42:49 -0600, Govinda wrote: > > >> Others have mentioned variable variables. While I have > >> used those, I tend to prefer arrays: > > > > ah, yes, I see that too, now. Thanks for reminding me about arrays. > > (You must be quite adept at arrays. ) > > I don't know, but I often stuff things into array, > such as the following snippet: > > ... while ($r = mysql_fetch_row ($res)) { > $news_paged[$page][$r[0]]['short_desc'] = $r[1]; > if (isset ($r[2])) > $news_paged[$page][$r[0]]['long_desc'] = $r[2]; > ... > > > I wonder if there's a noticable difference in performance > between variable variables and arrays... I'm guessing it's > small enough to be of no concern. > > > (And to give you credit Nisse, I ended up going with your solution > > ('knock on wood'.. it is not all done yet) from the other php-db list > > (building an array from data returned from the 3 union all selects- > > query).) > > I'm a total newbie when it comes to SQL beyond simple SELECTs. > If there's a noticable gain to be made from limiting the number > of rows returned from the database, then that is probably worth > persuing. Otherwise, I'd do it in PHP. > > > /Nisse -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php