/* getAll 1 (busqueda) - getAll - http://www.casinuevo.net/camion-isotermo-y-frio.html */ SELECT l.nombre localidad_nombre,l.url_nombre localidad_nombre_url, a.*,u.tienda,u.facebook_uid,u.tlf_verificado,u.telefono , (+IF(LOWER(a.keywords_busqueda) like LOWER('%camion%') OR LOWER('camion%') OR LOWER('%camion'),1,0) +IF(LOWER(a.keywords_busqueda) like LOWER('%camiones%') OR LOWER('camiones%') OR LOWER('%camiones'),1,0) +IF(LOWER(a.nombre) like LOWER('%camiones%') OR LOWER('camiones%') OR LOWER('%camiones'),1,0) +IF(LOWER(a.nombre) like LOWER('%camion%') OR LOWER('camion%') OR LOWER('%camion'),1,0) +IF(LOWER(a.nombre) like LOWER('%camion%') OR LOWER('camion%') OR LOWER('%camion'),1,0) +IF(LOWER(a.keywords_busqueda) like LOWER('%camion isotermo%') OR LOWER('camion isotermo%') OR LOWER('%camion isotermo'),1,0) +IF(LOWER(a.keywords_busqueda) like LOWER('%isotermos%') OR LOWER('isotermos%') OR LOWER('%isotermos'),1,0) +IF(LOWER(a.nombre) like LOWER('%isotermos%') OR LOWER('isotermos%') OR LOWER('%isotermos'),1,0) +IF(LOWER(a.nombre) like LOWER('%isotermo%') OR LOWER('isotermo%') OR LOWER('%isotermo'),1,0) +IF(LOWER(a.nombre) like LOWER('%camion isotermo%') OR LOWER('camion isotermo%') OR LOWER('%camion isotermo'),1,0) +IF(LOWER(a.keywords_busqueda) like LOWER('%camion isotermo frio%') OR LOWER('camion isotermo frio%') OR LOWER('%camion isotermo frio'),1,0) +IF(LOWER(a.keywords_busqueda) like LOWER('%frios%') OR LOWER('frios%') OR LOWER('%frios'),1,0) +IF(LOWER(a.nombre) like LOWER('%frios%') OR LOWER('frios%') OR LOWER('%frios'),1,0) +IF(LOWER(a.nombre) like LOWER('%frio%') OR LOWER('frio%') OR LOWER('%frio'),1,0) +IF(LOWER(a.nombre) like LOWER('%camion isotermo frio%') OR LOWER('camion isotermo frio%') OR LOWER('%camion isotermo frio'),1,0) +IF(patrocinado1 IS NOT NULL OR patrocinado2 IS NOT NULL,5,0) -IF(LENGTH(a.descript)>2200,2,0) ) as rank FROM anuncios a LEFT JOIN localidades l ON a.id_localidad = l.id INNER JOIN usuarios u ON u.id = a.id_usuario WHERE 1 AND id_subcategoria != 0 AND website = 'C' AND a.id_categoria !=321 AND id_subcategoria != '330' AND id_subcategoria != '260' AND (MATCH (a.keywords_busqueda) AGAINST ('+camion +isotermo +frio' IN BOOLEAN MODE)) order by rank desc, modificado desc LIMIT 0 , 30