I am using codeigniter's active record, but i've realized I probably need a regular SQL query for what I'm trying to accomplish. Could someone please look at this code and give me the correct format. What am I doing wrong here?
I think it's obvious what I'm trying to accomplish just by reading the code, but if you need more than just the syntax i've used (obviously in error), I'm happy to provide an explanation of code.
$today = date('Y-m-d H:i:s');
$where = "type == pk_card AND (end_date > $today OR qty >= 1)";
$this->db->select('id, title, pk_card_set, pk_card_number');
$this->db->from('auctions');
$this->db->where($where);
$this->db->like("CONCAT(title, ' ', pk_card_number, ' ', pk_card_set)", $keyword);
$query = $this->db->get();