Settings quotes Phpmyadmin

Discussion in 'Databases' started by piropeator, Mar 7, 2013.

  1. #1
    Hi, I use Phpmyadmin from Xampp.
    But in the sql editor the correct syntax for tables is:
    `table_name`
    Is posible to use
    'table_name' ???
     
    piropeator, Mar 7, 2013 IP
  2. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #2
    I never quote table or field names unless they're reserved words or they have spaces in them. Then I use normal single quotes - 'table name'.
     
    Rukbat, Mar 8, 2013 IP
  3. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #3
    A backtick ` is used so that the database doesn't think you are trying to execute a function. With a backtick you can name tables and columns using reserved words like SUM, DATE, etc. The table name itself does not actually have a backtick in it. I would avoid using any non alpha numeric character in a table name.
     
    jestep, Mar 19, 2013 IP