CodeIgniter Forums
Error Number: 1066 - Not unique table/alias - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Error Number: 1066 - Not unique table/alias (/showthread.php?tid=46482)



Error Number: 1066 - Not unique table/alias - El Forum - 11-02-2011

[eluser]Rodrigo Alexandre[/eluser]
hi guys,

Every time I use the functions:

$this->db->select('*');
$this->db->from('blogs');
$this->db->join('comments', 'comments.id = blogs.id');

return $this->db->get();

Returns this error:
Error Number: 1066
Not unique table / alias

Even if the table does not exist (as in this example above, I pasted this code inside a function of the model and it returned this error referring to a table that has no connection, because the table does not exist in my blogs database)

This is Bug? What do I fix this error?
Every time that happens, I need to use: $this->db->query("my query") and thus works.

thanks,

Rodrigo