title: Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL
body: <blockquote>
    <p>Warning: 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 'color:red'></p>
  </blockquote>
  
  <p>and this my code :</p>
  
  <pre><code>$db-&gt;query("UPDATE members set id='{$this-&gt;test['id']}', 
       lvl='{$this-&gt;userlvl}', ip='{$this-&gt;test['IP']}', 
       time='{$this-&gt;test['time']}', 
       linechat='{$this-&gt;test['msg']}' 
       WHERE user='{$this-&gt;test['name']}'");
  </code></pre>
  
  <p>I'm a beginner so please tell me what is must be ^^</p>
  
  <p>I have tried this </p>
  
  <pre><code>$fixchat = mysql_real_escape_string($this-&gt;test['msg']);
  $fixname = mysql_real_escape_string($this-&gt;test['name']);
  
  $db-&gt;query("UPDATE members set id='{$this-&gt;test['id']}',
       lvl='{$this-&gt;userlvl}', ip='{$this-&gt;test['IP']}', 
       time='{$this-&gt;test['time']}', linechat='{$fixchat}' 
       WHERE user='{$fixname}'");
  </code></pre>
  
  <p>but I got this error :</p>
  
  <blockquote>
    <p>Warning:  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 ''\wellington\'' at line 1...</p>
  </blockquote>