Mysql
 SQL >> Base de Dados >  >> RDS >> Mysql

Selecionar registro aleatório com CodeIgniter e MySQL

Use ORDER BY RAND ou driver equivalente:

$this->db->order_by('id', 'RANDOM'); $this->db->limit(1);