Fix: Standard SQL

This commit is contained in:
Laurent Destailleur 2010-09-28 16:53:38 +00:00
parent fc48d1888f
commit 6a488b8e08

View File

@ -107,7 +107,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
// D'abord on recupere la valeur max (reponse immediate car champ indexe)
$posindice=8;
$sql = "SELECT MAX(SUBSTRING(".$field.",".$posindice.")) as max";
$sql = "SELECT MAX(SUBSTRING(".$field." FROM ".$posindice.")) as max"; // This is standard SQL
$sql.= " FROM ".MAIN_DB_PREFIX."societe";
$sql.= " WHERE ".$field." LIKE '".$prefix."____-%'";