title: How can I solve this MYSQL INSERT INTO query error?
body: <p>I have a problem when I try to insert something in my MySQL database.</p>
  
  <p>Here is the error:</p>
  
  <blockquote>
    <p>Query error: 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 'LIMIT 1' at line 1 - Invalid query: INSERT INTO <code>banlog</code> (<code>ID</code>, <code>ip</code>, <code>player</code>, <code>admin</code>, <code>reason</code>, <code>day</code>, <code>time</code>) VALUES (NULL, 'Offline','4Gamers','4Gamers','3/3 warns', '3' , '2019-10-13 23:42:09') LIMIT 1</p>
  </blockquote>
  
  <p>Here is the code: </p>
  
  <pre><code>$query = $this-&gt;db-&gt;query("INSERT INTO `banlog` (`ID`, `ip`, `player`, `admin`, `reason`, `day`, `time`) VALUES (NULL, 'Offline',?,?,'3/3 warns', '3' , '$time') LIMIT 1", array($info['name'], getUserData($this-&gt;session-&gt;userdata('logged_in')["id"], "name")));
  </code></pre>
  
  
  
  <p>Thanks.</p>