Sorting numbers?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • [Birk] Phlip

    #1

    Sorting numbers?

    Hi everyone

    I got a list of movies and would like to select alle the movies starting
    with a numer 0-10 and another symbol (., #, !, etc.) but I don't know
    how to get them all in the same query. How do I do that?

    My query should look like this, but I don't know what to put instead of
    the ??
    "SELECT * FROM movies WHERE title = ?? ORDER BY created"

    --
    Philip Birk-Jensen | "You look just like a little hog.
    http://rock-zone.dk | Squeal piggy!" -Deliverance
  • [Birk] Phlip

    #2
    Re: Sorting numbers?

    [Birk] Phlip wrote:
    [color=blue]
    > Hi everyone
    >
    > I got a list of movies and would like to select alle the movies starting
    > with a numer 0-10 and another symbol (., #, !, etc.) but I don't know
    > how to get them all in the same query. How do I do that?
    >
    > My query should look like this, but I don't know what to put instead of
    > the ??
    > "SELECT * FROM movies WHERE title = ?? ORDER BY created"
    >[/color]

    I found it my self, if anyone is woundering this will do the trick:

    "SELECT * FROM moviedb WHERE left(title, 1) REGEXP '[0-9[:punct:]]'"

    --
    Philip Birk-Jensen | "You look just like a little hog.
    http://rock-zone.dk | Squeal piggy!" -Deliverance

    Comment

    Working...