You are here: Re: question about processing MySQL query result « PHP Programming Language « IT news, forums, messages
Re: question about processing MySQL query result

Posted by vito on 06/22/06 07:39

"strawberry" <zac.carey@gmail.com> wrote in message
news:1150957042.637266.181010@m73g2000cwd.googlegroups.com...
> in the query itself you could add 'order by rand() limit 4'

It works!

Now i'd like to implement a page function to separate 1000 records into 20
pages. But since the associative array does not use numeric index, i'm
unable to do so. Is there any good methods?

p.s. for numeric index:

I can generate, e..g.

Page 1 2 3 4 5 6 ...

and then calculate the mathematics and say, display a table by:

record[pageno*20+offset] record[pageno*20+offset+1]
record[pageno*20+offset+2]

and so on.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация