php3-list | 199901
Date: 01/31/99
- Next message: Boon: "Re: [PHP3] how to generate a complete functions..."
- Previous message: Reggie Burnett: "[PHP3] Email with no info"
- In reply to: Valerio Fioretti: "[PHP3] troubles..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, Jan 31, 1999 at 05:54:52PM +0100, Valerio Fioretti wrote:
>
> 1) I'm using the explode command to split the 'filename' string in more
> than one, if the user input more words. $words = explode (" ",$text);
> How do I manage them if I don't know how many strings $word[] will be
> generated ??
sizeof($words) will give you the number of elements in that array.
> 2) How do I make a search on both 'filename' and 'notes' columns,
> conditioned by the 'section' with the above strings ?
SELECT ... WHERE filename LIKE '...' AND notes LIKE '...'
I'm no MySQL expert, see the MySQL manual on how to search char/text fields.
> 3) How do I make a search for and ALL value in the 'section' field ?
Normally, you would append to the above SELECT statement
... AND section = 'sth'
Just leave out that specific part and your SQL server will select all columns.
--
Regards,
Sascha Schumann |
Consultant | finger sas <email protected>
| for PGP public key
--
PHP 3 Mailing List http://www.php.net/
To unsubscribe send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest list: php3-digest-subscribe <email protected>
For help: php3-help <email protected> Archive: http://www.php.net/mailsearch.php3
List administrator: zeev-list-admin <email protected>
- Next message: Boon: "Re: [PHP3] how to generate a complete functions..."
- Previous message: Reggie Burnett: "[PHP3] Email with no info"
- In reply to: Valerio Fioretti: "[PHP3] troubles..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

