> > ////////$sql = "SELECT * FROM agentdb WHERE ((OfficeID <> 214) and > > (agentdb.agent_id<> 1115421) and (agentdb.agent_id > 100) and > > agentdb.agent_id <> 333)) ORDER BY RAND() LIMIT 1"; > > > It does however seem to favor one agent more than the others. > > > Does anyone have any suggestions as to why this is occuring, please? > > I'd ask on a MySQL list/forum. This isn't going to be a PHP issue. Maybe > MySQL's RAND() function isn't very random.
Yeah, this has happened to me too, and its frustrating. But my script is a little different, first I am ordering my the guys who are sponsoring (so their results come up first in the search with a <preferred> graphic) and then the rest via RAND(), except it seems to be taking a secret mysql function called SCREW_YOU_I_WONT_RAND() :-) If you do find something please share back here. Cheers, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php