Random Query |
[eluser]Philo01[/eluser]
Hi there! I'm trying to pull random data from a table, and found the following "solution": http://www.derekallard.com/blog/post/ord...deigniter/ Code: $this->db->select('name'); Now when I apply this method on my application, I get the following error: Quote:A PHP Error was encountered My model returns the array to my controller: Code: $this->db->where('activated', '1'); Next, my Controller sends the array to a view: Code: foreach($ads as $a){ When I use this code without the shuffle part it works perfect, only it doesn't select randomly. When I use the shuffle solution, I get that error. Anyone who can help me out ![]() Kind regards, Philo |
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
|