#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    204
    Rep Power
    2

    Simple (syntax) question


    Code:
    $result = mysql_query("SELECT id, name FROM menu ORDER BY `order` ASC")
    in this example the word ORDER is encapsed by these and `. But in other statements i don't see them. whats their use?

    thanks!
  2. #2
  3. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,904
    Rep Power
    1045
    Hi,

    normally you cannot use "ORDER" as a name, because it's a reserved word. But if you quote the name with backticks, it is permitted, because the name `order` can no longer be confused with the SQL token "ORDER".

    Quoted names can include pretty much any character. See the manual.
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    204
    Rep Power
    2
    ooh ok! thank you very much!

IMN logo majestic logo threadwatch logo seochat tools logo