Ajout navigation next et preview sur l'onglet catgorie

This commit is contained in:
Regis Houssin 2006-02-19 18:21:02 +00:00
parent 94cb055eab
commit 48b7cce93f
2 changed files with 6 additions and 5 deletions

View File

@ -677,9 +677,9 @@ class Categorie
{
$cats = array ();
$sql = "SELECT c.fk_categorie, c.fk_product, p.rowid, p.label";
$sql = "SELECT c.fk_categorie, c.fk_product, p.rowid, p.ref";
$sql.= " FROM ".MAIN_DB_PREFIX."categorie_product as c, ".MAIN_DB_PREFIX."product as p";
$sql.= " WHERE p.label = '".$ref."' AND c.fk_product = p.rowid";
$sql.= " WHERE p.ref = '".$ref."' AND c.fk_product = p.rowid";
$res = $this->db->query ($sql);

View File

@ -152,11 +152,12 @@ if ($_GET["id"] || $_GET["ref"])
if ($_GET["id"])
{
$cats = $c->containing($_REQUEST['id']);
$cats = $c->containing($_REQUEST["id"]);
}
else
if ($_GET["ref"])
{
$cats = $c->containing_ref($_REQUEST['ref']);
$cats = $c->containing_ref($_REQUEST["ref"]);
}
if (sizeof($cats) > 0)