• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems creating an SQL query

#1
Hello I'm having problems with an SQL query I'm trying to do with CodeIgniter


Code:
$comments = $this->db
    ->select(array('posts.content', 'posts.id', 'posts.userid', 'posts.postid', 'posts.nodeview', 'posts.questionid','posts.groupid'))->join('users', 'posts.userid = users.id')
    ->select(array('users.username','users.avatarpath'))->order_by('posts.datetimenumber', 'DESC')
    ->limit(20, $page)
    ->get_where('posts', array('posts.userid' => $user['id'],'posts.nodeview !=' => "article",'posts.nodeview !=' => "pm" /*, 'posts.floor >' => 0 */  ) )
    ;


The problem is that I am using 2 NOT queries on posts.nodeview, and only one of them is being applied.

How can I make the query work?
Reply


Messages In This Thread
Problems creating an SQL query - by desbest - 01-04-2019, 10:28 AM
RE: Problems creating an SQL query - by jreklund - 01-04-2019, 10:53 AM
RE: Problems creating an SQL query - by Wouter60 - 01-04-2019, 12:52 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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