php-db | 2001071

[PHP-DB] a simple question From: Brad Lipovsky (syzme <email protected>)
Date: 07/09/01

can somebody help me with the following code:

function multi_word($title) {

 $array = explode (" ", $input);
 $number = count ($array);

  if ($number > 1) {
   return true;
  } else{
   return false;
  }

}

 if ($category) {
 $Query = "SELECT * from $TableName WHERE ((category)=$category)";
 } else {
  if ($title) {
   if (multi_word($title)) {
   print "one word at a time for now";
   die();
  } else {
  $Query = "SELECT * from $TableName WHERE title LIKE '%$title%'";
  }
 }
}

when i try to pass in a multi-word string it doesnt print anything. I have
tested the function and I know it works allright... if anyone could help
that would be great.

Brad

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe <email protected>
For additional commands, e-mail: php-db-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>