Mysql Question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nails
    Confirmed User
    • Jun 2007
    • 262

    #1

    Mysql Question

    Is there anyway using mysql only you can do a

    select * from table where str_length('password') < 5

    So way to get a return of all passwords with less then 5
    characters in them?

    Or do I need to use php?
  • BigBen
    Confirmed User
    • Nov 2004
    • 2299

    #2
    Code:
    SELECT * FROM table WHERE CHAR_LENGTH(password) < 5;

    Comment

    • Iron Fist
      Too lazy to set a custom title
      • Dec 2006
      • 23400

      #3
      Last to the party
      i like waffles

      Comment

      Working...