Why do I getan error of Resource id #52?
I have this query:
$unit = $this->input->get_post('inCode');
$sql = mysql_query('select ID from type where code like "%'.$unit.'%";');
I just want to output the variable $sql
in here:
$this->db->set('Unit', $sql);
$this->db->insert('structure');
I just get that error. I have to insert the ID from the table: type. It is an INTEGER and the column: Unit is also an INTEGER.