9:20 PM
Unknown
CODEIGNITER, MYSQL
In my MySQL to select between data
Example:
SELECT id, current_role_in_khmer
FROM currentrole
WHERE id NOT BETWEEN 11 AND 14
AND id NOT BETWEEN 18 AND 19
AND `status`=1
in codeigniter
$this->db->select('*');
$this->db->from('currentrole');
$this->db->where('status', '1');
$this->db->where('id !=',1 );
$this->db->where("id BETWEEN 2 and 4");
$data['get_currentrole_leader']=$this->db->get()->result();
Related Posts:
Convert NULL value to empty string use 'IF' in 'SELECT' statement SELECT id, IF(o.office IS NULL ,'',o.office ) as office FROM table … Read More
Search full name last name firstname in MySQL database SELECT * FROM table WHERE CONCAT( lastName, ' ', FristName) LIKE '%Rachana%' … Read More
To copy just structure and data MySQl To copy just structure and data use this one: CREATE TABLE tbl_new AS SELECT * FROM tbl_old; … Read More
Finding duplicate values in MySQLDo a SELECT with a GROUP BY clause. Let's say name is the column you want to find duplicates in: SELECT firstname, lastname , COUNT(*) c FROM civilservant GROUP BY firstname, lastname HAVING c &… Read More
Select bettwen in Where condition in mysql In my MySQL to select between data Example: SELECT id, current_role_in_khmerFROM currentroleWHERE id NOT BETWEEN 11 AND 14AND id NOT BETWEEN 18 AND 19AND `status`=1 in codeigniter &… Read More