tet3828 Posted October 24, 2006 Share Posted October 24, 2006 I must not have posed this question properly last post....22 reads to 1 response ::). Allow me to simplify...I have a database. Each Item in the database will have the following values:CATAGORYSUB-CATAGORYSTORE ITEM NUMBERNAMEDESCRIPTIONPRICWPRICE SMALL PICTUREPICTUREwhat script should I start with if I need all items in a selected catagory to be displayed in a table including an itme Name, Thumbnail, and price?Thanks again! ;D Quote Link to comment Share on other sites More sharing options...
Shad Posted October 24, 2006 Share Posted October 24, 2006 [code=php:0]<?phpif ($_GET['category']) { //this would be retrieved from e.g. index.php?category=something$category = $_GET['category'];//Lets say your table name is "products"$select = mysql_query("SELECT * FROM `products` WHERE `category`= '$category' ORDER BY `store_item_number` DESC");echo "<TABLE>";while ($qry = mysql_fetch_array($select)) {echo "<TR><TD>$qry[name]</TD><TD><IMG BORDER=\"0\" SRC=\"$qry[price_small_picture]\"></TD><TD>$qry[price]</TD></TR>";}echo "</TABLE>";}?>[/code]A very insecure and simple example. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.