Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

MySQL RAND() function is broken!

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

MySQL RAND() function is broken!

Post by mcrossley »

A little warning...

I was using the MySQL RAND() function to pull a random 'fact of the day' from a database table. Because I wanted the fact to remain the same for the duration of the day, and new 'random' fact to be chosen the next day, I seeded RAND() with an integer based on the year and day of the year - YYYYDDD. I noticed that the same 'facts' kept reappearing, some investigation showed that the seeding of the RAND() function is seriously broken/flawed in MySQL 5.6 - See http://stackoverflow.com/questions/2718 ... ost-repeat.
Post Reply