S
S
Steve2020-12-10 15:19:47
PHP
Steve, 2020-12-10 15:19:47

Custom RAND() function?

We need to randomize the data. Did according to this documentation.

In the request I add:
->orderBy('RAND()');
Everything works correctly. The question itself: Should the data be shuffled again with each new update and differ from the previous result?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lander, 2020-12-10
@CenterJoin

In this case, they will, because RAND() will return a random number each time it is called. Whether they should or not depends on the requirements. :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question