Results 1 to 2 of 2

Thread: MySQL Search First Character is numeric?

  1. #1

    Thread Starter
    Fanatic Member stickman373's Avatar
    Join Date
    Mar 2001
    Location
    MA
    Posts
    909

    MySQL Search First Character is numeric?

    How would I select all records where the name column starts with a number for example a table with the following:

    303main
    ad
    jack
    435 man
    44 something

    The query would select:

    303main
    435 man
    44 something

    because they start with a number. Any query that will do this? Thanks.

  2. #2
    Member
    Join Date
    Mar 2005
    Posts
    56

    Re: MySQL Search First Character is numeric?

    Probably a better way to do it, but this might work:
    PHP Code:
    select fields from table where left(field1in('0''1''2''3''4''5''6''7''8''9'
    Good luck;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width