Welcome Guest, Not a member yet? Register   Sign In
cant get a random mysql selection going :(
#10

[eluser]ommy[/eluser]
retarded solution number one (DB_active_rec.php – line 1544):
Code:
//$sql .= implode(', ', $this->ar_orderby); // original line

$bugcheck = implode(', ', $this->ar_orderby);
$sql .= substr($bugcheck, 0, 2)==$this->_escape_char." "?substr($bugcheck,2):$bugcheck;
helps me do:
Code:
$this->db->order_by('id','random');
$row = $this->db->get_where('gallery',array('active'=>1,'public'=>1),1)->row();
works for now, but i'm guessing it'll create more problems than it'll solve.
If anyone can find the true cause of this odd backtick, yr welcome to share Smile

Thanks a bunch already


Messages In This Thread
cant get a random mysql selection going :( - by El Forum - 09-12-2009, 08:00 AM
cant get a random mysql selection going :( - by El Forum - 09-12-2009, 08:15 AM
cant get a random mysql selection going :( - by El Forum - 09-12-2009, 09:23 AM
cant get a random mysql selection going :( - by El Forum - 09-12-2009, 12:01 PM
cant get a random mysql selection going :( - by El Forum - 09-12-2009, 07:01 PM
cant get a random mysql selection going :( - by El Forum - 09-12-2009, 08:07 PM
cant get a random mysql selection going :( - by El Forum - 09-13-2009, 07:52 AM
cant get a random mysql selection going :( - by El Forum - 09-13-2009, 08:38 AM
cant get a random mysql selection going :( - by El Forum - 09-13-2009, 08:50 AM
cant get a random mysql selection going :( - by El Forum - 09-13-2009, 09:04 AM
cant get a random mysql selection going :( - by El Forum - 09-13-2009, 09:07 AM
cant get a random mysql selection going :( - by El Forum - 09-13-2009, 09:10 AM
cant get a random mysql selection going :( - by El Forum - 09-13-2009, 09:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB