![]() Topic awaiting preservation: MySQL PHP - weighting random row selections (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: Northumberland, England |
![]() I'm looking for a way to randomly select rows from a MySQL database, giving preference to more recent additions in the database. |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
![]() smonkey: You want it random but with some kind of weighting towards more recent entries?! |
Paranoid (IV) Inmate From: Northumberland, England |
![]() Why? well because on a site i'm working on there is supposed to be four random images chosen from a database of past projects - obviously random is good, but if the randomness is weighted slighty towards the more recent projects then the more current and therefore better stuff will be shown more often - makes perfect sense |
Maniac (V) Inmate From: under the bed |
![]() |
Paranoid (IV) Inmate From: everywhere |
![]() Give the most recent entries a points score in a multidimensional php array, for example: |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
![]() yeah... usual strategy for this is |