There is an error on the SQL command.
SQL:
SELECT COUNT(CODIGO) as n FROM fbz_imoveis imo WHERE VER_WEB='Sim' and ORIGEM=0 AND (STATUS = 'VENDA' OR STATUS = 'ALUGUEL' OR STATUS = 'VENDA E ALUGUEL' OR STATUS = 'ALUGADO IMOBILIARIA/' OR STATUS = 'ALUGADO IMOBILIARIA' OR STATUS = 'ALUGADO TERCEIROS' OR STATUS = 'VENDIDO IMOBILIARIA' OR STATUS = 'VENDIDO TERCEIROS' OR STATUS = 'SUSPENSO') AND (STATUS like 'ALUGADO%' OR STATUS like 'VENDIDO%' OR STATUS = 'SUSPENSO') AND ( CODIGO_CATEGORIA='estacionamento' OR CODIGO_CATEGORIA='galpao' ) AND ( ( VLR_VENDA >= 100000 AND VLR_VENDA <= 300000 ) ) AND AREA_PRIVATIVA>0 AND ( ( AREA_PRIVATIVA>=0 and AREA_PRIVATIVA<=60 ) OR ( AREA_PRIVATIVA>=60 and AREA_PRIVATIVA<=120 ) )
Error:
MySQL server has gone away