I've done a sql query and I get a structure called query2. I'd like to use the item (coding) to search a different table.
Code:
$query2 = {CI_DB_mysqli_result} [8]
conn_id = {mysqli} [19]
result_id = {mysqli_result} [5]
result_array = {array} [0]
result_object = {array} [1]
0 = {stdClass} [1]
item = "coding"
But when I do the following I get an error "
Object of class stdClass could not be converted to string". Can I cast it to a string? I'd like $item to be "coding".
Code:
$item=$query2->result();
$sql3 = "SELECT a.qualified
FROM standard_activities sa, relation r, activity a WHERE sa.activity=? AND sa.id=a.id";
$query3=$this->db->query($sql3, array($item));
How can I get the binding SQL to work?
proof that an old dog can learn new tricks