cjkeane Posted March 2, 2011 Share Posted March 2, 2011 Hi everyone. I'm stuck on the following query. I need to display all the fields listed below on a page, but linked via communications.CommID. I'd appreciate any assistance you can provide. thank you. <?php $result = mysql_query("SELECT records.NameFirst_1, records.NameLast_1, records.CompanyName, records.CompanyBranch, records.CompanyReferenceNumber, records.CaseOwnerSelect, communications.ConversionType, communications.Contact, communications.ContactFrom, communications.CommID, communications.ContactPosition, communications.ContactTelephone, communications.ContactEmail, communications.ContactFax, communications.CallDate, communications.CallTime, communications.ActionTextField FROM records INNER JOIN communications ON records.IDNumber = '$IDNumber'") or die(mysql_error()); $row = mysql_fetch_array($result); ?> Quote Link to comment https://forums.phpfreaks.com/topic/229329-query-displaying-wrong-results/ Share on other sites More sharing options...
Zane Posted March 2, 2011 Share Posted March 2, 2011 I need to display all the fields ..... linked via communications.CommID. INNER JOIN communications ON records.IDNumber should be INNER JOIN communications ON communications.CommID Quote Link to comment https://forums.phpfreaks.com/topic/229329-query-displaying-wrong-results/#findComment-1181621 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.