PHP + MySQL

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jari

    #1

    PHP + MySQL

    if i do this:
    mysql_query("SE LECT id,game,release , from nexus order by release ASC");

    it will print a table like this:

    id game release
    6 gangland 04.03.2004
    7 sacred 23.03.2004
    8 far cry 23.03.2004


    So it orders them by date and by ID...

    tried something like withouth success ('coz i'm a newb)
    mysql_query("SE LECT id,game,release , from nexus order by release ASC AND
    order by game ASC");");

    How can i get far cry to be before sacred (alphabetically )??

    Thanks in advance ;)

    -jK-



  • Martin Buchleitner

    #2
    Re: PHP + MySQL

    * "Jari" <not@here.fi> wrote:
    [color=blue]
    > if i do this:
    > mysql_query("SE LECT id,game,release , from nexus order by release ASC");
    >
    > it will print a table like this:
    >
    > id game release
    > 6 gangland 04.03.2004
    > 7 sacred 23.03.2004
    > 8 far cry 23.03.2004
    >
    >
    > So it orders them by date and by ID...
    >
    > tried something like withouth success ('coz i'm a newb)
    > mysql_query("SE LECT id,game,release , from nexus order by release ASC AND
    > order by game ASC");");[/color]

    SELECT id,game,release FROM nexus ORDER BY release ASC, game ASC;


    Download mysqlcc [1] and play there with SQL-Statements.


    HTH, mabu


    Footnote(s):
    [1] <URL: http://www.mysql.com/downloads/mysqlcc.html>

    --
    Are you Anonymous? Where? ... I don't think so ...

    [ devnull{at}chao sfactory{dot}or g | http://www.chaosfactory.org/ ]

    Comment

    • Jari

      #3
      Re: PHP + MySQL

      > SELECT id,game,release FROM nexus ORDER BY release ASC, game ASC;[color=blue]
      >
      >
      > Download mysqlcc [1] and play there with SQL-Statements.
      >
      >
      > HTH, mabu
      >
      >
      > Footnote(s):
      > [1] <URL: http://www.mysql.com/downloads/mysqlcc.html>
      >
      > --
      > Are you Anonymous? Where? ... I don't think so ...
      >
      > [ devnull{at}chao sfactory{dot}or g | http://www.chaosfactory.org/ ][/color]



      Almost too simple.. Thanks ;)


      Comment

      Working...