<?phpreturn array(mt_rand() / mt_getrandmax());
Good morning, I would like to take this topic. I need to create a lottery system, I have a database like this: ID, NAME, REGISTRATION.I would like to return this data randomly, based on ID for example.There will be five draws, so I need the data that is drawn to be repeated, how can I do that?I'm using CC6
Please check this StackOverFlow answer
Thanks for the contact, but I have no idea how to resolve this.
Please, I need to resolve this.
In the "read data", set the "select type" to "first matching record", then write the following code in the "offset" box:
Now add a "PHP" function, set the name to "random" and write this code:
return rand(0, 9); //assuming you have 10 records in the table
I did exactly as you said, but only returns the 1st ID.Here are pictures of how it is
2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com