It is necessary to integrate parts of the SQL query, I am interested in lines 3.4 and 13
$num = 6; $page = (int)$_GET['page']; $count = mysql_query("SELECT COUNT(*) FROM table_products WHERE visible = '1'", $connect); $temp = mysql_fetch_array($count); if ($temp[0] > 0) { $tempcount = $temp[0]; $total = (($tempcount - 1) / $num) + 1; $total = intval($total); $page = intval($page); if (empty($page) or $page < 0) $page = 1; if ($page > $total) $page = $total; $start = $page * $num - $num; $qury_start_num = " LIMIT $start, $num"; } Here with this request. And is it possible at all?
if ($filtering != '') { $query .= 'WHERE ' . $filtering . ' ORDER BY ' . $sorting; } else { $query .= 'ORDER BY ' . $sorting; }