Question and answer is powered by AnsPress.io
I am using Codeigniter framework and here I want to use not equal in where condition when I fetching data from database. How can I apply not equal in condition of MySQL query.
If you want to use not equal in where condition using codeigniter the follow this example code.
<?php $sec_qry=$this->db->select('*')->from('table name')->where('id!=',$id)->order_by('id','desc')->get()->result(); return $sec_qry; ?>