MYSQL Question
- jonno
-
jonno
- Member since: Dec. 15, 1999
- Offline.
-
- Forum Stats
- Member
- Level 16
- Blank Slate
ok, i have a quickie mysql question, i have a database that holds pictures and other info. what is the mysql script to have sql choose a random row id and display it? thanks
- liljim
-
liljim
- Member since: Dec. 16, 1999
- Offline.
-
- Send Private Message
- Browse All Posts (11,644)
- Block
-
- Forum Stats
- Staff
- Level 28
- Blank Slate
At 7/22/01 03:23 PM, jonno wrote: ok, i have a quickie mysql question, i have a database that holds pictures and other info. what is the mysql script to have sql choose a random row id and display it? thanks
SELECT * FROM table ORDER BY RAND() LIMIT 1
:)
- jonno
-
jonno
- Member since: Dec. 15, 1999
- Offline.
-
- Forum Stats
- Member
- Level 16
- Blank Slate
At 7/22/01 05:39 PM, liljim wrote:At 7/22/01 03:23 PM, jonno wrote: ok, i have a quickie mysql question, i have a database that holds pictures and other info. what is the mysql script to have sql choose a random row id and display it? thanksSELECT * FROM table ORDER BY RAND() LIMIT 1
)
THANKS DUDE!

