August 2015 - Custom Web Development Blog

Archive - August 2015

Symfony 2: Doctrine 2 get random entites (MySQL)

Often during the process of developing projects on the Symfony 2 framework and Doctrine 2 ORM many web applications developers face the problem of getting random records from a MySQL database. Most developers know that this issue is not new, and all solutions that already exist have been known for a long time. But you can hardly find an implementation of any of them on the Symfony 2 framework and Doctrine 2 in the Internet. In this post I want to propose you , in my opinion, the most simple way of selecting random records from MySQL by means of the function RAND.Read More