A Database Error Occurred

Error Number: 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 '' at line 1

SELECT companies.*,logos.url as logo,adverts.url as advert,profiles.url as profile,videos.url as video FROM companies LEFT JOIN logos on logos.company_id=companies.id LEFT JOIN adverts on adverts.company_id=companies.id LEFT JOIN profiles on profiles.company_id=companies.id LEFT JOIN videos on videos.company_id=companies.id WHERE companies.id=