Alias, how? - 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: Alias, how? (/showthread.php?tid=10014) |
Alias, how? - El Forum - 07-16-2008 [eluser]Asinox[/eluser] Hi, im trying to make a JOIN but i hav a field with the same name in both tables, how i ll make a ALIAS for 1 field? Code: function listar_subcategorias(){ Thanks Alias, how? - El Forum - 07-16-2008 [eluser]Asinox[/eluser] thanks i did it Code: function listar_subcategorias(){ Alias, how? - El Forum - 07-16-2008 [eluser]meigwilym[/eluser] Do you mean an alias for table names? This is what I think you need (personally, I like to write out my SQL queries, so I'll do the same here). Code: $sql = "SELECT * FROM subcategories AS sc Bear in mind that this query will return everything, so you may need a WHERE clause too, but that depends on your needs, of course. Best, Mei Alias, how? - El Forum - 07-16-2008 [eluser]Asinox[/eluser] Thanks u |