String of multiple WHERE conditions passed to CodeIgniter's where() method call corrupts the built WHERE clause [duplicate]
I am having issues getting a large WHERE statement to function using CodeIgniter's query builder. Below is the code I currently have public function get_pending_posts($userid) { $where = "posts.complete = 0 AND poststatuses.contact != 3 AND (poststatuses.poster = $userid OR poststatuses.accepter = $userid)"; $data = $this->db->select('posts.id AS postid, posts.option, a.gravatar, posts.title,p.firstname AS pfirstname, p.lastname AS plastname, a.firstname AS afirstname, a.lastname AS alastname, poststatuses.contact,poststatuses.modified') ->join('users p','poststatuses.poster = p.id') ->join('u
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.