$username Posted November 28, 2007 Share Posted November 28, 2007 So I have this code and I am trying to pull info from more then one table. i think I am close to getting this. It does not display the info as of now. Thanks <br \> <table width="900" border="2" rules="all" cellpadding="2" cellspacing="2" bordercolor="#000000" > <tr bgcolor="#CCCCCC"> <td><strong>Case ID:</strong></td> <td><strong>Contact Email</strong></td> <td><strong>Contact Phone</strong></td> <td><strong>Contact Fax</strong></td> </tr> <?PHP $AccNumber = $_GET['AccNum']; $sql162 = "SELECT cases.CaseID, cases.CaseSubject, cases.CaseOwner, cases.CaseAccountID, contacts.ContactFname, contacts.ContactLname, contacts.ContactAccountNumber, account.AccountName, account.AccountNumber FROM cases, contacts, account WHERE CaseAccountID = '$AccNumber' LIMIT 0,9"; $query162 = mysql_query($sql162); while($row162 = mysql_fetch_array($query162)) { //echo "<tr>"; echo "<tr>"; //echo("<td><a href=\"viewaccount.php?AccNum=" . $row["AccountNumber"] . "\" title=\"".$row["AccountID"]."\">" . $row["AccountID"] . "</a></td>"); echo "<td>".$row162['ContactFname']."</td>"; echo "<td>".$row162['CaseSubject']."</td>"; echo "<td>".$row162['CaseOwner']."</td>"; echo "<td>".$row162['AccountName']."</td>"; echo "</tr>"; } ?> </table> Link to comment https://forums.phpfreaks.com/topic/79300-solved-getting-data-from-more-than-one-table-with-mysql/ Share on other sites More sharing options...
pocobueno1388 Posted November 28, 2007 Share Posted November 28, 2007 Put a die statement after you execute the query to see if there are any errors. $query162 = mysql_query($sql162)or die(mysql_error()); Link to comment https://forums.phpfreaks.com/topic/79300-solved-getting-data-from-more-than-one-table-with-mysql/#findComment-401389 Share on other sites More sharing options...
$username Posted November 28, 2007 Author Share Posted November 28, 2007 It does not output any thing. Brett Link to comment https://forums.phpfreaks.com/topic/79300-solved-getting-data-from-more-than-one-table-with-mysql/#findComment-401391 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.