I want to fetch data for multiple value from single column, but only the last one (price = 399) is visible on page.
I am using this code, please help I want to fetch data for all 3 prices.
<a href="show_products.php?price=149&price=299&price=399">
I want to fetch data for multiple value from single column, but only the last one (price = 399) is visible on page.
I am using this code, please help I want to fetch data for all 3 prices.
<a href="show_products.php?price=149&price=299&price=399">
if (isset($_GET['price']) && $_GET['price']<>"")
{
$productprice= $_GET['price'];
$productprice_result=mysql_query("select * from products where price=$productprice");
while($productprice_rows=mysql_fetch_array($productprice_result)){
$productid=$productprice_rows["product_id"];
$productsql=$productsql. "and price=$productprice ";
}
try it