[PHP] MySQL select rand() with weighting?

2001-05-03 Thread James, Yz
Hi Guys, Does anyone know how to select one field randomnly from a MySQL table against a weighting column in the same row the field is selected from? For example, SELECT id, url, image FROM table ORDER BY rand() LIMIT 1. And have a column like weighting where values between 1 and 100 are

Re: [PHP] MySQL select rand() with weighting?

2001-05-03 Thread Mark Maggelet
On Thu, 3 May 2001 20:15:26 +0100, James, Yz ([EMAIL PROTECTED]) wrote: Hi Guys, Does anyone know how to select one field randomnly from a MySQL table against a weighting column in the same row the field is selected from? For example, SELECT id, url, image FROM table ORDER BY rand() LIMIT