title: php -> MYSQL query can't figure out what is wrong getting error #1064
body: <p>I am trying to insert some values in the table the query is below:</p>
  
  <pre><code>Insert into 
  auditlog (
            event,
            desc,
            userid,
            useripaddress,
            audittype
  )
  VALUES (
           'User Authenticated', 
           'Useradminsuccessfully logged in to the system', 
           '1', 
           '127.0.0.1','1'
  ) 
  </code></pre>
  
  <p>It gives me the following error:
   #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc,userid,useripaddress,audittype)VALUES ('User Authenticated', 'User admin su' at line 1</p>
  
  <p>However when i run the insert using PHPMYAdmin it does insert a value and the query generated is </p>
  
  <pre><code>INSERT INTO 
       `auditlog`(
                `event`, 
                `desc`, 
                `userid`, 
                `useripaddress`, 
                `audittype`) 
       VALUES (
                'User Authenticated', 
                'Useradminsuccessfully logged in to the system', 
                '1', 
                '127.0.0.1','1'
       ) 
  </code></pre>
  
  <p>The only difference i see is the quotes which i dont believe are needed. I don't understand where am i going wrong and am breaking my head now :):)</p>