Skip to content
Snippets Groups Projects
Commit 42e47b2b authored by Rodolphe Quiedeville's avatar Rodolphe Quiedeville
Browse files

Correction bug de recherche

parent 2ea5087e
No related branches found
No related tags found
No related merge requests found
......@@ -46,8 +46,6 @@ $type=isset($_GET["type"])?$_GET["type"]:$_POST["type"];
$sortfield = isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"];
$sortorder = isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"];
$page = $_GET["page"];
if ($page < 0) {
$page = 0 ; }
$limit = $conf->liste_limit;
$offset = $limit * $page ;
......@@ -84,9 +82,9 @@ if ($_POST["mode"] == 'search')
else
{
$sql .= " WHERE 1=1";
if (isset($_GET["type"]) || isset($_POST["type"]))
if (strlen($_GET["type"]) || strlen($_POST["type"]))
{
$sql .= " AND p.fk_product_type = ".(isset($_GET["type"])?$_GET["type"]:$_POST["type"]);
$sql .= " AND p.fk_product_type = ".(strlen($_GET["type"])?$_GET["type"]:$_POST["type"]);
}
if ($sref)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment