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'] Quote 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 Quote 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 (edited) wicked thanks dude that worked. w Edited October 6, 2012 by fife Quote Link to comment https://forums.phpfreaks.com/topic/269158-feild-name-issues/#findComment-1383199 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.