A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: facit/cursos.php

Line Number: 56

Database Error

Ocorreu um erro no banco de dados

Error Number: 1064

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 '' at line 3

SELECT id FROM (curso_fotos) WHERE `fotPrincipal` = 1 AND id =