mysql哪里条件不起作用?

I have written my php code in codeigniter but when I set $limit = 1, still i get records that have seen = 1 why?? i have written a mysql query in pure sql but the problem remains ! here is my code :

function getComment($limit)
{
    while( !$this->checkFuncState('getComment') );
    $this->lockFunc('getComment');
    $grade = $this->session->userdata('grade');
    $this->db->select('*');
    $this->db->select('m_comments.id AS `ComId`');
    $this->db->select('m_comments.approved AS `Comappr`');
    $this->db->select('m_comments.content AS `ComContent`');
    $this->db->select('m_users.hid AS `UserHid`');
    $this->db->from('m_comments');
    $this->db->join('m_users','m_comments.user_id = m_users.id');
    if( $grade == "0" || $grade == "1" )
        $this->db->where("( m_comments.approved = 0 || m_comments.approved = -15 )");
    else
        $this->db->where('m_comments.approved','0');
    $this->db->where('m_comments.seen','0');
    $this->db->limit($limit);
    $q = $this->db->get();
    $this->setComsSeen($q);
    $this->unlockFunc('getComment');
    return $q;
}