Thursday, 5 February 2015

Get a random List using mysql -- Login used for elections

select * from teammaster where ac_no=$cons and allot_flg='N' and psno is null order by rand() limit 1

The above statement gives a random result from the table teammaster.


No comments:

Post a Comment