RE: [PHP-DB] Random Selecting from mySQL

2002-03-13 Thread Gurhan Ozen
e versa.. Did I confuse you enough?:) I hope this helps.. Gurhan -Original Message- From: Georgie Casey [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 13, 2002 7:11 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Random Selecting from mySQL yea, i know how to dis

Re: [PHP-DB] Random Selecting from mySQL

2002-03-13 Thread Billy S Halsey
Hi, You might try something like this: 1) Create a temporary table in MySQL using the data from the table you are selecting from. 2) On each page, do your select with "order by rand() limit 10" from the temporary table 3) Do a second query to delete the rows that you just selected from the te

RE: [PHP-DB] Random Selecting from mySQL

2002-03-13 Thread Demitrious S. Kelly
lowing duplicates on a per visit basis... -Original Message- From: Georgie Casey [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 13, 2002 4:11 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Random Selecting from mySQL yea, i know how to display 10 results per page,

RE: [PHP-DB] Random Selecting from mySQL

2002-03-13 Thread Beau Lebens
could you perhaps do the select on the first page, then store the results in a session (array) and just load different indexed portions of the resultset each page? only problem there is that you wouldn't get any refreshed results while browsing those pages - but i don't know if this matters for y

Re: [PHP-DB] Random Selecting from mySQL

2002-03-13 Thread Georgie Casey
yea, i know how to display 10 results per page, but that doesnt work when you want to do a ORDER BY rand() query. "Gurhan Ozen" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > are you just looking for a way to display 10 results per page? If yes then > you can

RE: [PHP-DB] Random Selecting from mySQL

2002-03-13 Thread Gurhan Ozen
are you just looking for a way to display 10 results per page? If yes then you can just use LIMIT to limit your result to 10 .. So, for the first page, you can do "SELECT LIMIT 1, 10;" and for the second page "SELECT ... LIMIT 11, 20" etc etc . You can sure use "ORDER BY" with "LIMIT" to t