Hi Rob,

Thanks for the idea....I think it is probably a better way to go also.
Hers what I came up iwth...and the rest of the code pertaining to the goal.

I'm sure that I'm, overlooking something simple here, but I can't seem to
make this work...


srand ((double) microtime() * 1000000);
$r = mysql_query('select count(*) as cnt from agentdb');
$cnt = mysql_result($r, 0, 0);
mysql_free_result($r);
$rnd = rand(1, $cnt);
$sql = "SELECT * FROM agentdb WHERE ((OfficeID <> 214) and
(agentdb.agent_id<> 1115421) and (agentdb.agent_id > 100) and
agentdb.agent_id <> 333)) LIMIT $rnd, 1";
 $results= mysql_query($sql);
 $agent=mysql_fetch_array($results);
 $agent_ref = $agent['agent_ref'];
 $agent_id =  $agent['agent_id'];
 $agent_first = $agent['agent_first'];
 $agent_last = $agent['agent_last'];
 $agent_first = rawurldecode($agent_first);
 $agent_last = rawurldecode($agent_last);

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to