nickf1 wrote:i am so confused now...give me a minute to read through everything and try and understand.
Thanks for all your help
Don't worry, I'm confused too. I thought it was a fairly straight-forward solution, and had never run into that particular limitation before.
If the SQL solution is not tenable, then you could do something like:
$query = "SELECT `filename`, `url` FROM (featured_articles) ORDER BY `KEY` ASC LIMIT 5";
$result = @mysql_query($query);
$data = array();
while ($row = mysql_fetch_assoc($result)){
$data[] = $row;
}
$ix = array_rand($data);
printf (" ID: %s FileName: %s", $data[$ix]['url'], $data[$ix]['filename']);