Code:
ORDER BY SponsoredListing DESC, (RAND()*physician.physician_ID)
This isn't really random as the physician with the higher id will appear much more often than one with a lower id i.e. take 2 physicians one with an id of 1000 and the other with an id of 1 then
rand() * 1000 is likely to be much higher than
rand() * 1. Perhaps it should be
Code:
ORDER BY SponsoredListing DESC, RAND()
This would still always place the higher sponsored items above the lower sponsored items no matter what. If you wanted some lower sponsored items to occasionally appear then you could have a number associated with each sponsorship level i.e. 5-1 where 5 is the highest. Then you could just have :
Code:
ORDER BY SponsorLevel * Rand() desc
which would put the higher sponsored items higher in the list but still give a chance to the lower sponsored items to appear.
Mike