[eluser]Unknown[/eluser]
Hello,
I'm trying to get data from a normal question with db->query. I have this question
$data['query'] = $this->db->query("SELECT table1.id, table1.name, table2.id, table2.name
FROM table1, table2
WHERE table1.table2_id = table.id");
The query gives the right results when I test them in mysql prompt but I can only get name and id from one of the tables. I cannot get for exampe table2.name only name ($row->name but not $row->table2.name).
Are there any one who can help me?
I'm using db->query because I am more used to write normal sql questions. If anyone can give me an explanation why to use codeignitors way to solve this (and how in that case).
/Pelle