Hi Laserlight,
Thanks for taking the time to guide me in the right direction.
I will try to explain what I trying to achieve.
Here is the test site I am working on.
(Disclaimer) I did not build the original site or database. I just started working for this company and I am trying to help them design a more user-friendly site for the teachers.
http://intheclassroom.org/noFrames/products/index.php
When you go to this page there are 3 categories.
Videos (prodType=1)
Books (prodType=2)
Merchandise & Apparel (prodType=3)
When you go to any of the Videos, you will get the info for that item and the links at the bottom, middle are for the "other" items in the Video category.
But, when you go to the Books or Merchandise category, it should not display the links to the videos.
This is where I am stuck. If you go to the books, it will show the video links at the bottom.
I am trying to build a loop to show only the links for that category.
Here is my code for that section (at the bottom of the page for the links):
<?PHP
$sql2 = "Select prodName, prodID, prodType, prodGroup from tblProduct Where prodType='1' AND prodID !=". $prodID ." ORDER BY prodName ASC";
$result2 = mysql_query($sql2);
echo "<hr>";
while ($row2 = mysql_fetch_array($result2, MYSQL_ASSOC)) {
echo "<a href=\"http://www.intheclassroom.org/noFrames/products/product.php?prodID=".$row2['prodID']."\">".$row2['prodName']."</a>";
echo "<br>";
}
?>
The databse shcema is as follows:
There are 5 tables in the database.
1) tblItems (this is the pricing, taxable, info, etc for each item)
2) tblMedia (this is the video links for the realmedia snippets of video)
3) tblProduct (this is where the descriptions, comments, etc are for each item)
4) tblSchool (this is the info for all the schools, locations, etc.)
5) tblStates (this is info for each state, tax, regulations, etc)
I hope this is comprehensive enough to show what I have and where I am trying to go.
As always, I appreciate your knowledge and gift in helping.
Don