• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Surplus quote mark when ordering by RAND

#1
[eluser]darrenm[/eluser]
I think I've found a bug

Code:
$this->CI->db->order_by('track','random');
$query = $this->CI->db->get('tracks');

produces a db error with SQL output of:

Code:
SELECT * FROM (`tracks`) ORDER BY ` RAND()

That little quote mark in front of RAND() shouldn't be there.

Also, I shouldn't really have to specify a field name to get random ordering.


Messages In This Thread
Surplus quote mark when ordering by RAND - by El Forum - 11-27-2008, 11:03 AM
Surplus quote mark when ordering by RAND - by El Forum - 12-01-2008, 07:43 PM
Surplus quote mark when ordering by RAND - by El Forum - 01-09-2009, 04:25 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.