$query_limit_rsItems = sprintf("%s LIMIT %d, %d", $query_rsItems, $startRow_rsItems, $maxRows_rsItems);
$rsItems = mysql_query($query_limit_rsItems, $conn_dynamic) or die(mysql_error());
$row_rsItems = mysql_fetch_assoc($rsItems);
to:
$query_limit_rsItems = sprintf("%s LIMIT %d, %d", $query_rsItems, $startRow_rsItems, $maxRows_rsItems);
if (((isset($_GET["show"]))?$_GET["show"]:"") != "all") {
$rsItems = mysql_query($query_limit_rsItems, $conn_dynamic) or die(mysql_error());
} else {
$rsItems = mysql_query($query_rsItems, $conn_dynamic) or die(mysql_error());
}
$row_rsItems = mysql_fetch_assoc($rsItems);
and also changed the following code:
$all_rsItems = mysql_query($query_rsItems, $conn_dynamic);
$totalRows_rsItems = mysql_num_rows($all_rsItems);
to:
$all_rsItems = mysql_query($query_rsItems, $conn_dynamic);
$totalRows_rsItems = mysql_num_rows($all_rsItems);
if (((isset($_GET["show"]))?$_GET["show"]:"") == "all") $maxRows_rsItems = $totalRows_rsItems;