Guest Posted September 24, 2007 Share Posted September 24, 2007 I am trying to make a query that will only bring up rows that have a certian amount of characters.Is it possible to do this for two characters? Quote Link to comment Share on other sites More sharing options...
jitesh Posted September 24, 2007 Share Posted September 24, 2007 Not sure but just try. select * from `table` where (CHAR_LENGTH(`fieldname`) = 2) May be just working with Mysql 5 Quote Link to comment Share on other sites More sharing options...
fenway Posted September 24, 2007 Share Posted September 24, 2007 or LENGTH()? Beware of multi-byte characters. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.