ERROR EN CONSULTA :
'SELECT P.*, F.familia, SF.subfamilia, P.subfamilia AS Psubfamilia, TE.descripcion AS descrip_exis, P.existencias FROM productos P , familias F, subfamilias SF, tipos_existencias TE WHERE P.familia = F.id AND P.subfamilia = SF.id AND P.id = AND P.estado != 0 AND TE.existencias = P.existencias'
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 'AND P.estado != 0 AND TE.existencias = P.existencias' at line 7