Fix: pgsql compatibility

This commit is contained in:
Laurent Destailleur 2011-09-14 22:36:07 +00:00
parent 0b624b859a
commit e6bfb81bda
2 changed files with 2 additions and 2 deletions

View File

@ -272,7 +272,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
{ {
$sql = "SELECT code_client FROM ".MAIN_DB_PREFIX."societe"; $sql = "SELECT code_client FROM ".MAIN_DB_PREFIX."societe";
$sql.= " WHERE code_client = '".$code."'"; $sql.= " WHERE code_client = '".$code."'";
$sql.= " AND rowid != '".$soc->id."'"; if ($soc->id > 0) $sql.= " AND rowid != ".$soc->id;
$resql=$db->query($sql); $resql=$db->query($sql);
if ($resql) if ($resql)

View File

@ -212,7 +212,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
{ {
$sql = "SELECT code_client FROM ".MAIN_DB_PREFIX."societe"; $sql = "SELECT code_client FROM ".MAIN_DB_PREFIX."societe";
$sql.= " WHERE code_client = '".$code."'"; $sql.= " WHERE code_client = '".$code."'";
$sql.= " AND rowid != '".$soc->id."'"; if ($soc->id > 0) $sql.= " AND rowid != ".$soc->id;
$resql=$db->query($sql); $resql=$db->query($sql);
if ($resql) if ($resql)