title: MySQL error 1064 inner join
body: <p>I write this SQL :</p>
  
  <pre><code>INSERT INTO registered (`idc`, `idp`, `date`)
  SELECT 'idc' 
  FROM course,registered
      INNER JOIN course c ON c.idc=registered.idc 
  WHERE course.title='aaa',
        (SELECT `idp` FROM participant,registered
        INNER JOIN participant ON participant.idp=registered.idp WHERE 
        participant.username='mmm')
  </code></pre>
  
  <p>I get this error: </p>
  
  <blockquote>
    <p>1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use
    near '
        (SELECT <code>idp</code> FROM participant,registered    INNER JOIN participant ON pa' at line 4</p>
  </blockquote>