Page 1 of 1

URGENT

Posted: Fri Dec 26, 2003 12:48 am
by sowmya_ganesh
Please help me

i got data from mysql like below

$rsSize= mysql_query ($sSql);
while($rsSizeRow = mysql_fetch_array($rsSize))

this will give all roww one by one

but i want to get a perticualr row in array ?

say i want to take a row by using rand ?

how it is possible ?

psl help me

Posted: Fri Dec 26, 2003 1:45 am
by aquila125
If you just want a random row from the database use this:

SELECT ..... FROM table_name WHERE ... ORDER BY rand() LIMIT 0,1

it will give you 1 row, selected randomly