2
0
forked from Wavyzz/dolibarr

New: Ajout methode ifsql dans les gestionnaire de bases

This commit is contained in:
Laurent Destailleur
2005-07-03 11:41:12 +00:00
parent acc943ebab
commit d47a6c1f37
2 changed files with 31 additions and 1 deletions

View File

@@ -450,6 +450,21 @@ class DoliDb
return strftime("%Y%m%d%H%M%S",$fname);
}
/**
\brief Formatage d'un if SQL
\param operande1 operande 1
\param operande2 operande 2
\param resok resultat si test egal
\param resko resultat si test non egal
\return string chaine format<61> SQL
*/
function ifsql($operande1,$operande2,$resok,$resko)
{
return 'IF('.$operande1.'='.$operande2.','.$resok.','.$resko.')';
}
/**
\brief Renvoie la derniere requete soumise par la methode query()
\return lastquery