View Single Post
  #9 (permalink)  
Old 06-15-2007, 11:33 AM
DaveSawers's Avatar
DaveSawers DaveSawers is offline
WebProWorld Veteran
 

Join Date: Dec 2006
Location: Calgary, Alberta, Canada
Posts: 388
DaveSawers RepRank 1
Default Re: how to display one record in SQL/PHP

The SQL to get the product for the product page could be something like:

$qstring = $_SERVER["QUERY_STRING"];
$id = substr($qstring,strpos($qstring,"=") + 1);
$query = "select * from products where id=" . $id;
...

Then for the nav bar generation you can construct a query to get all the products in a particular category, sorting them to whatever order you want and then loop through the SQL result putting up each product in your nav bar.
__________________
Dynamic Software Development
www.activeminds.ca
Reply With Quote