|
-
Aug 7th, 2001, 10:38 AM
#1
Getting 5 rows of info from a table in a mysql database..
Ok,
So, I want to get 5 horses and the info from a mysql table.
I have 9 horses in the table. Im using php to write the script and I was thinking of using rand(1,9) 5 times, but it is likely i will get the same horse, maybe more than once. I have been told I can order the table randomly and use the first 5 row's id to get vars like $horse1[some_info] and $horse4[some_more_info] you understand?
So, what I could do with is some php code putting 5 id's from this 9 horse table into an array, then finding each horses info that was selecting earlier.
Any help please?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|