[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-db
Subject:    Re: [PHP-DB] SELECT WHERE length of content question
From:       Daniel Brown <danbrown () php ! net>
Date:       2011-03-09 23:38:38
Message-ID: AANLkTiks7JgKEXbcaJ003WagoXHho250gPPc_ee84W90 () mail ! gmail ! com
[Download RAW message or body]

On Wed, Mar 9, 2011 at 17:49, Ron Piggott
<ron.piggott@actsministries.org> wrote:
> 
> Is there a command in mySQL that would allow me to SELECT the rows where the `fax` \
> column is more than 11 characters long?

    There is.

    SELECT * FROM tblName WHERE CHAR_LENGTH(fax) >= 11;

    (Presuming you meant greater than or equal to eleven, as in an
invalid US/Canadian phone number.)

-- 
</Daniel P. Brown>
Network Infrastructure Manager
http://www.php.net/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic