X
Subir imagen
    • u
    • REGÍSTRATE AQUÍ
  • INGRESAR
SELECT b.*, (select count(id) from banner_imp where banner=b.id) as itotal, (select nombre from empresas where id=b.empresa) as nempresa, (select id from empresas where id=b.empresa) as idEmp FROM banners as b WHERE b.area=1 && (select division from empresas where id=b.empresa) = ORDER BY itotal ASC LIMIT 1