Change that to:
SELECT * FROM foo_table WHERE length(bar_field)>1;
-----Original Message-----
From: Tamas Arpad [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 25, 2001 8:01 AM
To: Niklas Lamp�n; Php-DB
Subject: Re: [PHP-DB] mySQL Query and blank fields
On Thursday 25 October 2001 13:16, Niklas Lamp�n wrote:
> How can I query for specified fields that has to contain atleast 2
> charters?
SELECT * FROM foo_table WHERE length(bar_field)>=1;
Arpi
>
> Example:
> Field AAA contains '' (NULL) => No match
> Field BBB contains ' ' (one charter) => No match
> Field CCC contains 'ab' => Match
> Field DDD contains 'abcdefg' => Match
>
>
> Niklas
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]