Jump to content


This topic is now archived and is closed to further replies.


Pass 2 url - filter

Recommended Posts

I have two fields in a table that I need filtering. The fields are passed but it does not filter subcat2_id?
can anyone help?
$colname_store_items = "1";
if (isset($_GET['subcat2_id'])) {
  $colname_store_items = (get_magic_quotes_gpc()) ? $_GET['subcat2_id'] : addslashes($_GET['subcat2_id']);
$colname_store_items = "1";
if (isset($_GET['subcat_id'])) {
  $colname_store_items = (get_magic_quotes_gpc()) ? $_GET['subcat_id'] : addslashes($_GET['subcat_id']);
mysql_select_db($database_vacuumshop, $vacuumshop);
$query_store_items = sprintf("SELECT * FROM store_items WHERE subcat_id = %s AND store_items.subcat2_id", $colname_store_items);
$store_items = mysql_query($query_store_items, $vacuumshop) or die(mysql_error());
$row_store_items = mysql_fetch_assoc($store_items);
$totalRows_store_items = mysql_num_rows($store_items);

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.