*** empty log message ***

git-svn-id: http://piwigo.org/svn/trunk@19 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
z0rglub
2003-05-27 20:56:13 +00:00
parent 4ac5b8f83f
commit 0b6204e5fb
21 changed files with 208 additions and 251 deletions
+7
View File
@@ -405,6 +405,10 @@ function initialize_category( $calling_page = 'category' )
$words = explode( ',', $_GET['search'] );
$sql_search = array();
foreach ( $words as $i => $word ) {
// if the user searchs any of the words, the where statement must
// be :
// field1 LIKE '%$word1%' OR field2 LIKE '%$word1%' ...
// OR field1 LIKE '%$word2%' OR field2 LIKE '%$word2%' ...
if ( $_GET['mode'] == 'OR' )
{
if ( $i != 0 ) $page['where'].= ' OR';
@@ -413,6 +417,9 @@ function initialize_category( $calling_page = 'category' )
$page['where'].= ' '.$field." LIKE '%".$word."%'";
}
}
// if the user searchs all the words :
// ( field1 LIKE '%$word1%' OR field2 LIKE '%$word1%' )
// AND ( field1 LIKE '%$word2%' OR field2 LIKE '%$word2%' )
else if ( $_GET['mode'] == 'AND' )
{
if ( $i != 0 ) $page['where'].= ' AND';