filter out records not working, any ideas?
ok ive done this before but now it doesnt seem to work. i have a product list page that shows categories, these are not dynamic then these are linked to the category page, but whats happening is all products in all categories are being displayed and i dont know why. any ideas?
code is below
each link on the category page is the following
<a href="product-page-list.php?catID=<?php echo $row_rsProd['catID']; ?>"><img name="cats_r2_c1" src="images/cats/cats_r2_c1.gif" width="232" height="90" border="0" id="cats_r2_c1" alt="" /></a>
then the code for the product-page-list.php is as follows
$var1_rsProd = "-1";
if (isset($_GET['catID'])) {
$var1_rsProd = $_GET['catID'];
}
mysql_select_db($database_JB, $JB);
$query_rsProd = sprintf("SELECT * FROM JB_cats, JB_products WHERE JB_cats.catID AND JB_products.catID AND JB_cats.catID = %s", GetSQLValueString($var1_rsProd, "int"));
$query_limit_rsProd = sprintf("%s LIMIT %d, %d", $query_rsProd, $startRow_rsProd, $maxRows_rsProd);
$rsProd = mysql_query($query_limit_rsProd, $JB) or die(mysql_error());
$row_rsProd = mysql_fetch_assoc($rsProd);
if (isset($_GET['totalRows_rsProd'])) {
$totalRows_rsProd = $_GET['totalRows_rsProd'];
} else {
$all_rsProd = mysql_query($query_rsProd);
$totalRows_rsProd = mysql_num_rows($all_rsProd);
}
$totalPages_rsProd = ceil($totalRows_rsProd/$maxRows_rsProd)-1;
then the images from the selected category are displayed as images
<img src="images/uploads/thumbs/<?php echo $row_rsProd['prodImage']; ?>"/>
any advise would be great
thanks
