Hey HTH,
I knew I was missing something. Let me continue with a bit of background information now.
The content I am providing is for an inventory system we have at work. It displays inventory by Item Number, Description, Location, Quantity, Minimum Stock Level, & Maximum Stock Level.
I have it so it gives you different information based on what type of report. I'm not always displaying the same content either. I'm not doing anything special, just my querys change.
My database is setup like:
DB: Inventory
Table: Items
Columns: inv_id, item_no (varchar), description (varchar), location (char), quantity (int), min_stock_level (int), max_stock_level (int)
An example of the code in my page is as follows:
<?php
//Set the page title and include the HTML header.
$page_title = 'Inventory Database {-Inventory Below Minimum Stock Level-}';
include('./includes/header.php');
// Database Connection
include ('./includes/db.php');
?>
<table border="0" cellspacing="0" cellpadding="0" id="mm_bodytbl" align="center">
<tr>
<td align="center">
<?php
//Grab the amount of records in the database
$result = mysql_query("select * from inventory where Quantity_onHand < Min_Stock_Level");
$num_rows = mysql_num_rows($result);
echo '<span class="mm_num_rcd">' . $num_rows . ' ' . 'records are being displayed.' . '</span><br><br>';
//Printer Friendly Version Link
echo '<a href="pf_inv_min.php" target="_blank">PRINTER FRIENDLY VERSION</a><br><br>';
$queryOut = mysql_query("select * from inventory where Quantity_onHand < Min_Stock_Level order by Item_No");
while($row=mysql_fetch_array($queryOut))
{
//Build table for each record.
echo '<table id="mm_display" align"center"><tr><td width="30%">';
//Display records
echo 'Item No.:' . '</td><td>' . $row['Item_No'] . "</td></tr><tr><td>";
echo 'Description:' . '</td><td>' . $row['Description'] . "</td></tr><tr><td>";
echo 'Quantity:' . '</td><td>' . $row['Quantity_onHand'] . "</td></tr><tr><td>";
echo 'Minimum Level:' . '</td><td>' . $row['Min_Stock_Level'] . "</td></tr><tr><td>";
echo 'Maximum Level:' . '</td><td>' . $row['Max_Stock_Level'] . "<br>";
//End table
echo "</td></tr></table><br>";
}
?>
</td>
</tr>
</table>
<?php include ('./includes/footer.php') ?>
I was thinking of inserting the inv_id right above the item_no as a link so it would bring up more fields. I want to add the following fields to another table (vendorid, vendor, price, etc.). Once the id was clicked, the new fields would be visible.
I thought of looking at a content management thing (I even looked at my postnuke page in the template, couldn't do it) but I'm not sure what to look for in the code. I'm pretty good at seeing what I want on a page and grabbing what I need. Just not this time.
Any help provided would be super appreciated. Thanks again. Anymore info you need, please let me know.