Skip to content
Extraits de code Groupes Projets
Valider 63a8cd56 rédigé par esj's avatar esj
Parcourir les fichiers

critere a champs imbriqués (P.Andrews)

parent b86ffb1c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -213,7 +213,6 @@ function phraser_args($texte, $fin, $sep, $result, &$pointeur_champ) { ...@@ -213,7 +213,6 @@ function phraser_args($texte, $fin, $sep, $result, &$pointeur_champ) {
} }
$arg = $regs[2]; $arg = $regs[2];
if (trim($regs[1])) { if (trim($regs[1])) {
$champ = new Texte; $champ = new Texte;
$champ->texte = $arg; $champ->texte = $arg;
...@@ -242,7 +241,7 @@ function phraser_args($texte, $fin, $sep, $result, &$pointeur_champ) { ...@@ -242,7 +241,7 @@ function phraser_args($texte, $fin, $sep, $result, &$pointeur_champ) {
$result[] = $champ; $result[] = $champ;
$collecte[] = $champ; $collecte[] = $champ;
} }
$rec = substr($args, $n + strlen($r[0])); $rec = substr($args, $n + strlen($r[0]) -1);
$champ = new Champ; $champ = new Champ;
$champ->nom_boucle = $r[2]; $champ->nom_boucle = $r[2];
$champ->nom_champ = $r[3]; $champ->nom_champ = $r[3];
...@@ -340,7 +339,7 @@ function phraser_criteres($params, &$result) { ...@@ -340,7 +339,7 @@ function phraser_criteres($params, &$result) {
// plus d'un argument: // plus d'un argument:
// c'est soit le critere LIMIT debut,fin si a se termine par un chiffre // c'est soit le critere LIMIT debut,fin si a se termine par un chiffre
// soit le critere PAR soit un critere perso // soit le critere PAR soit un critere perso
if (($var->type != 'texte') || if (($var->type != 'texte') ||
(strpos("0123456789", $param[strlen($param)-1]) (strpos("0123456789", $param[strlen($param)-1])
!== false)) !== false))
...@@ -357,7 +356,6 @@ function phraser_criteres($params, &$result) { ...@@ -357,7 +356,6 @@ function phraser_criteres($params, &$result) {
$crit->param = $v; $crit->param = $v;
$args[] = $crit; $args[] = $crit;
} else { } else {
if ($var->type != 'texte') if ($var->type != 'texte')
erreur_squelette('criteres',''); erreur_squelette('criteres','');
else { else {
...@@ -489,8 +487,9 @@ function phraser($texte, $id_parent, &$boucles, $nom, $ligne=1) { ...@@ -489,8 +487,9 @@ function phraser($texte, $id_parent, &$boucles, $nom, $ligne=1) {
$result->type_requete = $type; $result->type_requete = $type;
phraser_args($milieu,">","",$all_res,$result); phraser_args($milieu,">","",$all_res,$result);
$milieu = substr($result->apres,1); $milieu = substr($result->apres,1);
phraser_criteres($result->param, $result);
$result->apres = ""; $result->apres = "";
phraser_criteres($result->param, $result);
} }
// //
// Recuperer la partie conditionnelle avant // Recuperer la partie conditionnelle avant
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter