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 '' at line 1SELECT caravans.*, sitename,areaname, area.ID areaID,phone,realname,email,users.ID userID FROM caravans JOIN sites on siteID = sites.ID JOIN area on areaID = area.ID JOIN uc_link on caravans.ID = caravanID JOIN users on users.ID = userID WHERE caravans.ID =