Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Forums
Blogs
Articles
Groups
Galleries
Member List
Calendar
Home
Forum
Simply Business
Fucking Around & Business Discussion
quick php/mysql
quick php/mysql
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
alex79
Confirmed User
Join Date:
Jun 2002
Posts:
996
Share
Post
#1
quick php/mysql
11-30-2003, 01:24 PM
i have a table with 1000 urls
what is the easyest way to display 20 random url's?
Spudstr
Confirmed User
Join Date:
Jan 2003
Posts:
2321
Share
Post
#2
11-30-2003, 01:36 PM
use this query select * from TABLE order by rand() limit 20
contact me if you want me to code somthing
Managed Hosting - Colocation - Network Services
Yellow Fiber Networks
icq: 19876563
Comment
Post
Cancel
alex79
Confirmed User
Join Date:
Jun 2002
Posts:
996
Share
Post
#3
11-30-2003, 01:48 PM
Originally posted by Spudstr
use this query select * from TABLE order by rand() limit 20
with his will be 20 consecutive urls? becouse i don't want to be consecutive
Comment
Post
Cancel
Spudstr
Confirmed User
Join Date:
Jan 2003
Posts:
2321
Share
Post
#4
11-30-2003, 01:59 PM
no, it should pull 20 random rows open up a mysql client and run it a couple times.
Managed Hosting - Colocation - Network Services
Yellow Fiber Networks
icq: 19876563
Comment
Post
Cancel
fuzebox
making it rain
Join Date:
Oct 2003
Posts:
22353
Share
Post
#5
11-30-2003, 02:35 PM
Originally posted by alex79
with his will be 20 consecutive urls? becouse i don't want to be consecutive
That's what the "order by rand()" part is for ;)
Comment
Post
Cancel
Previous
template
Next
Working...
OK
OK
Cancel
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎
☕
Comment