Re: Random record from latest 10 entries...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In message <710827.54108.qm@xxxxxxxxxxxxxxxxxxxxxxx>, Anees
<anees_muhd@xxxxxxxxx> writes
>HI Pete,
>
>Thanks for ur help
>But , still der is a chance to not get the image,
>Imagine, If admin(he manages the site) deleted the Record with image Id 55 and 
>runs ur query with Rand()*10 returns 5 when MAX(image Id) gives 60

$result=0;
while !$result {
  do the query
  $result=number of records returned
}

-- 
Pete Clark

Sunny Andalucia
http://hotcosta.com/Andalucia.Spain

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux