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.
|