Retour code d'erreur sur doublon de référence

This commit is contained in:
Rodolphe Quiedeville 2004-08-10 14:43:23 +00:00
parent b587cb7fc2
commit d3af4397a9

View File

@ -75,6 +75,7 @@ class Product
{ {
$this->ref = ereg_replace("'","",stripslashes($this->ref)); $this->ref = ereg_replace("'","",stripslashes($this->ref));
$this->ref = ereg_replace("\"","",stripslashes($this->ref)); $this->ref = ereg_replace("\"","",stripslashes($this->ref));
$sql = "SELECT count(*)"; $sql = "SELECT count(*)";
$sql .= " FROM ".MAIN_DB_PREFIX."product WHERE ref = '" .trim($this->ref)."'"; $sql .= " FROM ".MAIN_DB_PREFIX."product WHERE ref = '" .trim($this->ref)."'";
@ -119,6 +120,10 @@ class Product
return -1; return -1;
} }
} }
else
{
return -3;
}
} }
} }
/** /**