Codes here !
Moderators: macek, egami, gesf
I am just starting to get to grips with inner joins but I cannot see how to reference a given column in the result e.g. normally for unique columns I would just reference each column as $row['colname'] but where there are multiple tables with the same column name e.g. table1.name, table2.name etc. the reference $row['table1.name'] does not work - can anyone help me out? Thanks in advance!
- New php-forum User
- Posts: 1
- Joined: Sun Jul 01, 2012 11:27 am
When you do the select, do it as select table1.name as table1_name, table2.name as table2_name etc.
So, you can access the result as $row['table1_name'] or $row['table2_name'].
- php-forum Super User
- Posts: 1805
- Joined: Thu Mar 10, 2011 5:07 pm
Return to mySQL & php coding
Who is online
Users browsing this forum: Google [Bot] and 1 guest