I have the following:
/** Load necessary stuff **/
$this->load->helper('date');
$this->db->get('site_requests');
//echo mdate('%Y-%m-%d %H:%i:%s', now());
//die;
$this->db->where("(created_for <= " . "'2019-04-24 18:47:03'" . ")");
$this->db->get();
print_r($this->db->last_query());
But I receive the following:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE (
created_for<= '2019-04-24 18:47:03')' at line 2SELECT * WHERE (`created_for` <= '2019-04-24 18:47:03')
Filename: modules/sound/models/Sound_request_model.php
Line Number: 35
What am I doing wrong?