• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Order by Length - impressed this worked :-)

#1
Hi,

Was really impressed that this worked:

PHP Code:
$this->db->order_by('LENGTH(story_text)''DESC'); 

I sat there for ages wondering how I was going to order by length, and I just thought I would try it (it is part of a much longer query so I did not want to write it all out as SQL), and wow, it worked!

Just thought I would share that.

Paul.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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