Forum Moderators: coopster

Message Too Old, No Replies

WHERE number of letters > 2

How is this done?

         

mooger35

10:23 pm on Dec 8, 2005 (gmt 0)

10+ Year Member



What I need to do is pull up all the entries in my database where the number of letters in a field is > 2.

I tried "WHERE strlen(`field`) > 2" but that didn't work. Can someone point me in the right direction?

Thanks.

ChadSEO

10:46 pm on Dec 8, 2005 (gmt 0)

10+ Year Member



mooger35,

You're very close, the SQL function for length is 'length'. So:

WHERE length(`field`) > 2

Hope that helps.

Chad

mooger35

10:50 pm on Dec 8, 2005 (gmt 0)

10+ Year Member



ahhh so simple. Thanks!