[SOLVED] Multitable Array Search : How to display results
Posted: Sat Jun 25, 2005 12:27 am
Hi All,
I've finally figured the Multitable Db search but now i'm unsure on how to echo the results.
So far the Query is :
And i'm outputting the results from the ausapapersummary like so :
But how does one assign ("$query_data") from another table?
ie, description from the austock table.
tia, Will.
I've finally figured the Multitable Db search but now i'm unsure on how to echo the results.
So far the Query is :
Code: Select all
$query = "SELECT ausapapersummary.paperCategoryId, aupapercategory.paperCategory, ausapapersummary.colloPaperName, ausapapersummary.stockId, austock.description, ausapapersummary.adhesiveId, auadhesive.description, auliner.description, ausapapersummary.linerId FROM ausapapersummary ";
$query .="LEFT JOIN aupapercategory ON ausapapersummary.paperCategoryId = aupapercategory.papercategoryId
LEFT JOIN austock ON ausapapersummary.stockId = austock.StockId
WHERE ausapapersummary.paperCategoryId = '$paperCategoryId'";Code: Select all
while($query_data = mysql_fetch_array($result)) {
$paperCategory = $query_data["paperCategory"];
$colloPaperName = $query_data["colloPaperName"];
$stockId = $query_data["stockId"];
echo "<TR>\n";
echo "<TD WIDTH=\"25%\" ALIGN=\"CENTER\">$paperCategory</TD>\n";
echo "<TD WIDTH=\"25%\" ALIGN=\"CENTER\">$colloPaperName</TD>\n";
echo "<TD WIDTH=\"25%\" ALIGN=\"CENTER\">$stockId</TD>\n";ie, description from the austock table.
tia, Will.