fife Posted October 6, 2012 Share Posted October 6, 2012 Hi guys I have an issue some field names. there are two the same. one in my members table called name and one in my company table called name. How to I echo the name of the members over the company when the tables are joined? I have tried echo $query['members.name']; echo $query['company.name'] Link to comment https://forums.phpfreaks.com/topic/269158-feild-name-issues/ Share on other sites More sharing options...
Barand Posted October 6, 2012 Share Posted October 6, 2012 use column aliases SELECT company.name as cname, members.name as mname Link to comment https://forums.phpfreaks.com/topic/269158-feild-name-issues/#findComment-1383197 Share on other sites More sharing options...
fife Posted October 6, 2012 Author Share Posted October 6, 2012 wicked thanks dude that worked. w Link to comment https://forums.phpfreaks.com/topic/269158-feild-name-issues/#findComment-1383199 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.