title: #1064 - You have an error in your SQL syntax; ....." ...INNER JOIN"
body: <pre><code>SELECT 
    COUNT(IPD_Admit_Register_Det.BID) AS BID, 
    Bed_WardList.WID, Bed_FloorList.FID 
  FROM 
    Bed_BedList 
    INNER JOIN shift_last_bed 
      INNER JOIN IPD_Admit_Register_Det 
        ON shift_last_bed.IPDid = IPD_Admit_Register_Det.IPDid 
        AND shift_last_bed.IDPdid = IPD_Admit_Register_Det.IPDdid 
      ON Bed_BedList.BID = IPD_Admit_Register_Det.BID 
    INNER JOIN Bed_FloorList 
      INNER JOIN Bed_WardList 
        ON Bed_FloorList.FID = Bed_WardList.FID 
      ON Bed_BedList.WID = Bed_WardList.WID
  GROUP BY 
    IPD_Admit_Register_Det.BID, 
    Bed_WardList.WID, 
    Bed_FloorList.FID
  </code></pre>
  <p>above query is execute successfully in mssql server 2008 but when same doing in MySql using phpMyAdmin it throws error like</p>
  <blockquote>
  <h1>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</h1>
  <p>near 'ON Bed_BedList.BID = IPD_Admit_Register_Det.BID INNER JOIN
  Bed_FloorList INNER J' at line 5</p>
  </blockquote>