Subversion Repositories Applications.referentiel

Rev

Rev 290 | Rev 293 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 290 Rev 291
Line 404... Line 404...
404
					
404
					
405
					// Utilisation d'une recherche de chaîne
405
					// Utilisation d'une recherche de chaîne
406
					if (preg_match('/^"(.*)"$/', $valeur, $match)) {
406
					if (preg_match('/^"(.*)"$/', $valeur, $match)) {
407
						$valeur = '%'.$match[1].'%';
407
						$valeur = '%'.$match[1].'%';
408
					} elseif ($valeur == "#") {
-
 
409
						$valeur = 1;
408
					} elseif ($valeur == "#") {
410
					}else{
409
					}else{
411
						// Recherche de mots non liés
410
						// Recherche de mots non liés
412
						$mots = explode(' ', $valeur);
411
						$mots = explode(' ', $valeur);
413
						$valeur = '%'.implode ('%', $mots).'%';
412
						$valeur = '%'.implode ('%', $mots).'%';
Line 463... Line 462...
463
		// Initialisation de variables
462
		// Initialisation de variables
464
		$where = ' WHERE ';
463
		$where = ' WHERE ';
Line 465... Line 464...
465
		
464
		
466
		// Construire where en fonction des paramêtres 
465
		// Construire where en fonction des paramêtres 
467
		if (isset($p['mots'])) {
466
		if (isset($p['mots'])) {
468
			if ($p['mots'] == "#") {
467
			if (stripos($p['mots'], "#") == 1) {
469
				$where .= "1";
468
				$where .= " 1 ";
470
			} else {
469
			} else {
471
			$where .= 'AND ('.	
470
			$where .= 'AND ('.	
472
				" num_nom LIKE {$p['mots']} ".
471
				" num_nom LIKE {$p['mots']} ".