1
Mox20
SQL: "RAND ()" and Criteria
  • 2010/9/28 11:14

  • Mox20

  • Just popping in

  • Posts: 16

  • Since: 2008/12/13


Hello,

The "RAND ()" for the random selection is not provided in the method "setOrder?

To do this:
$ Criteria-> setOrder ("RAND ()");

Google translation.

Thank you

2
ghia
Re: SQL: "RAND ()" and Criteria
  • 2010/9/28 11:55

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1



3
Mox20
Re: SQL: "RAND ()" and Criteria
  • 2010/9/28 12:00

  • Mox20

  • Just popping in

  • Posts: 16

  • Since: 2008/12/13


Thank you, but rand () is not taken into account, I looked at the kernel code, it seems that "rand ()" was not planned ...

Anyone can confirm this?

En français :

Merci, mais rand() n'est pas pris en compte, j'ai regardé le code du noyau, il semble que "rand()" n'a pas été prévu...

Quelqu'un peut me confirmer ça ?

4
Mox20
Re: SQL: "RAND ()" and Criteria
  • 2010/9/28 12:06

  • Mox20

  • Just popping in

  • Posts: 16

  • Since: 2008/12/13


Oops,

I reversed setOrder setSort

Problem solved

Login

Who's Online

339 user(s) are online (211 user(s) are browsing Support Forums)


Members: 0


Guests: 339


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits