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); ?> 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 Link to comment https://forums.phpfreaks.com/topic/229329-query-displaying-wrong-results/#findComment-1181621 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.