simple php related
i wanna know how can we display right content on one of the results page.
I will explain the background 1st so that you dont get confused :)
Well i m maintaining a database & has structure just like how you guys structure for e-commerce.
At insert page, when adding product there is an option to chose category. here choosing multiple cat option in given.
Now data store as multiple like this: 1,2,3,4.........
Now on results page i know how to display value of 1 category name thru something like this:
<?php $_GET['ID'] = $row_Products[‘CategoryID’]?>
<?php
$colname_CategoryName = "-1";
if (isset($_GET['ID'])) {
$colname_CategoryName = $_GET['ID'];
}
mysql_select_db($database_con1, $con1);
$query_CategoryName = sprintf("SELECT * FROM LockoutPoints WHERE ID = %s", GetSQLValueString($colname_CategoryName, "int"));
$CategoryName = mysql_query($query_CategoryName, $con1) or die(mysql_error());
$row_CategoryName = mysql_fetch_assoc($ProductCatName);
$totalRows_CategoryName = mysql_num_rows($ProductCatName);
?>
then to show category name i insert php as this:
<?php echo $row_CategoryName['Name'];?>
So lets say i had choosen multiple categories for a product. This display just the first value present in category. ie 1's (category name) ex: 1,2,3,4
I wanna display all category names from 1,2,3,4 values. (category names)
How can this be done?
Anyone?