Welcome Guest, Not a member yet? Register   Sign In
get_where question
#1

[eluser]Fenix[/eluser]
I am trying to write a query with CI where I want to select all posts in a database that have the status (an enum data type) of anything but "deleted". How would I write this code?

Code:
$this->db->select('post_id,title,name,type,status,description');
return $this->db->get_where('posts', array('post_status' != 'deleted'))->result();

I assume what I have (!=) is wrong. What is the correct way to do this?
Other statuses are "published" or "private".

Thanks!


Messages In This Thread
get_where question - by El Forum - 10-31-2008, 01:28 PM
get_where question - by El Forum - 10-31-2008, 02:10 PM
get_where question - by El Forum - 01-13-2009, 01:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB