ilyawizard
Programmer
I have a table full of articles. Each article is categorized by disease. Also I have a page that needs randomly choose an article with specific disease. First I'm using COUNT() to find out how many articles of the specific category I have. Then I randomly generate the namber between 1 and COUNT(). And then when it gets tricky. Is there a way to get an article right away if I know the number in the order. Right now I have a for loop that fetches an array number of times random number was generated:
for ($i=1;$i<$rnd;$i++){
$info=@mysql_fetch_array($query);
}
DO you know any faster way?
for ($i=1;$i<$rnd;$i++){
$info=@mysql_fetch_array($query);
}
DO you know any faster way?