GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   quick php/mysql (https://gfy.com/showthread.php?t=203216)

alex79 11-30-2003 03:24 PM

quick php/mysql
 
i have a table with 1000 urls

what is the easyest way to display 20 random url's?

Spudstr 11-30-2003 03:36 PM

use this query select * from TABLE order by rand() limit 20

contact me if you want me to code somthing

alex79 11-30-2003 03:48 PM

Quote:

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

Spudstr 11-30-2003 03:59 PM

no, it should pull 20 random rows open up a mysql client and run it a couple times.

fuzebox 11-30-2003 04:35 PM

Quote:

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 ;)


All times are GMT -7. The time now is 10:20 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123