July 06, 2008, 07:47:43 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Revenue sharing launched. This is offered as a "thank you" for being a member of webmasterstalks.com community! If you have an Adsense/Yahoo publisher account then you can start right away !
 
  Home   Forum   Help Search Directory Calendar Login Register    RSS 2.0 feedAtom feed


News
Revenue sharing launched. This is offered as a "thank you" for being a member of webmasterstalks.com community! If you have an Adsense/Yahoo publisher account then you can start right away !
Pages: [1]
  Print  
Author Topic:

Random row

 (Read 907 times)
0 Members and 1 Guest are viewing this topic.
spiderx
Jr. Member
**

Points: 3
Offline Offline

Posts: 62



« on: September 18, 2006, 11:54:31 »

Hi,

Is possible to get a random row in mysql ?


Logged

Regards
Spider X


TheGodFather
Administrator
Hero Member
*****

Points: 202
Offline Offline

Posts: 2570



WWW
« Reply #1 on: September 18, 2006, 18:28:11 »

select * from table order by rand() limit 1;

if you want more field increase your limit Smiley

Regards
Logged

spiderx
Jr. Member
**

Points: 3
Offline Offline

Posts: 62



« Reply #2 on: September 19, 2006, 00:46:00 »

Thanks TGF. It's working ... Smiley Smiley Smiley

Logged

Regards
Spider X
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.4 | SMF © 2006, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks

TinyPortal v0.9.7 © Bloc
Valid XHTML 1.0! Valid CSS!