I am doing a result_array() in my get_where query but the column in 'added_by' is json format to {'id': '(the id)'}
How Can I do a get_where query to match the current users id.
Heres what I have so far.
$this->db
->order_by('till', 'desc')
->get_where('coupon',
[
'added_by' => json_encode(array('id'=> $this->session->user_id)),
'status' => 'ok'
]
)
->result_array()