Jump to content

Archived

This topic is now archived and is closed to further replies.

shai1

Php Mysql "select" Question

Recommended Posts

Is there a way I can do a select that will return the records with a character count less then a specific number?

i.e. select * from table where character count of textField<=30

Share this post


Link to post
Share on other sites
try this...

[code]
SELECT * FROM table_name WHERE LENGTH(column_name)<=30;
[/code]

[!--quoteo(post=389369:date=Jun 29 2006, 01:07 PM:name=shai1)--][div class=\'quotetop\']QUOTE(shai1 @ Jun 29 2006, 01:07 PM) [snapback]389369[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Is there a way I can do a select that will return the records with a character count less then a specific number?

i.e. select * from table where character count of textField<=30
[/quote]

Share this post


Link to post
Share on other sites
This is EXACTLY what I was looking for. Thanks so much!

I love internet forums! [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]

[!--quoteo(post=389377:date=Jun 29 2006, 01:26 PM:name=jworisek)--][div class=\'quotetop\']QUOTE(jworisek @ Jun 29 2006, 01:26 PM) [snapback]389377[/snapback][/div][div class=\'quotemain\'][!--quotec--]
try this...

[code]
SELECT * FROM table_name WHERE LENGTH(column_name)<=30;
[/code]
[/quote]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.