[eluser]Total Shop UK[/eluser]
How to I select data from a specific table?
I know
$row->table1.name will not work but how should I do it?
Code:
$query = $this->db->query("SELECT * FROM table1 JOIN table2 ON table1.id=table2.id WHERE table1.id=1");
if ($query->num_rows()>0){
foreach ($query->result() as $key => $row){
$data['name'] = $row->table1.name;
}
}
Cheers,
TSUK