Browse Source

Optimisation recherche de tag: requete sql prend en compte les "-", ",", ", "

bastien 13 years ago
parent
commit
1cdc28644c
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/Muzich/CoreBundle/Controller/SearchController.php

+ 6 - 1
src/Muzich/CoreBundle/Controller/SearchController.php View File

@@ -379,7 +379,12 @@ class SearchController extends Controller
379 379
     {
380 380
       if (strlen($string_search) > 1)
381 381
       {
382
-        $words = explode(' ', $string_search);
382
+        $words = array_merge(
383
+          explode(' ', $string_search),
384
+          explode('-', $string_search),
385
+          explode(',', $string_search),
386
+          explode(', ', $string_search)
387
+        );
383 388
         $where = '';
384 389
         $params = array();
385 390
         foreach ($words as $i => $word)