Welcome Guest, Not a member yet? Register   Sign In
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


Messages In This Thread
Order by Length - impressed this worked :-) - by PaulD - 08-29-2016, 08:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB