Welcome Guest, Not a member yet? Register   Sign In
Random Query
#3

[eluser]Philo01[/eluser]
[quote author="CtheB" date="1260490524"]Sorry i don't use active record in codeigniter so i can't help you.

It is much easier to do it like this:

$query = $this->db->query("SELECT * FROM orders where activated = 1 AND expired = 0 ORDER BY rand() ");
return $query->result_array();[/quote]

Thanks mate! Smile


Messages In This Thread
Random Query - by El Forum - 12-10-2009, 12:06 PM
Random Query - by El Forum - 12-10-2009, 12:15 PM
Random Query - by El Forum - 12-10-2009, 04:02 PM
Random Query - by El Forum - 12-10-2009, 04:40 PM
Random Query - by El Forum - 08-27-2012, 05:42 AM



Theme © iAndrew 2016 - Forum software by © MyBB