Welcome Guest, Not a member yet? Register   Sign In
Same database column names when iterating through database results
#3

[eluser]cinoob[/eluser]
[quote author="CI Coder" date="1258947656"]I take it the both tables have a column named "id". Either change the name of that column in one of the tables and the query accordingly, or use something like "SELECT table1.id as id, table2.id as id1, ... from table1 INNER JOIN table2 ON table1.id = table2.id". I'm not sure however that you need to select table2.id column at all.

Hope that helps.[/quote]


Thanks, changing the select statement works perfectly using AS.


Messages In This Thread
Same database column names when iterating through database results - by El Forum - 11-22-2009, 04:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB