php-db | 2001071
Date: 07/09/01
- Next message: leo g. divinagracia iii: "Re: [PHP-DB] New to PHP and MySQL"
- Previous message: chris <email protected>: "[PHP-DB] New to PHP and MySQL"
- Maybe in reply to: Brad Lipovsky: "[PHP-DB] a simple question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Brad,
Your parameter is named $title and you are converting a variable called $input to an array.
You could catch this type of errors if you change the setting for error_reportiong in php.ini.
- Frank
> 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>
>
>
>
-- 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>
- Next message: leo g. divinagracia iii: "Re: [PHP-DB] New to PHP and MySQL"
- Previous message: chris <email protected>: "[PHP-DB] New to PHP and MySQL"
- Maybe in reply to: Brad Lipovsky: "[PHP-DB] a simple question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

