WHERE ( descr LIKE _utf8"%mankai%" collate utf8_general_ci AND descr LIKE _utf8"%marsala%" collate utf8_general_ci AND (fmt_w BETWEEN 18 AND 28) AND (fmt_h BETWEEN 28 AND 38) ) |
|
WHERE ( match (descr,nomweb,nomserie) against ('mankai* marsala*' in BOOLEAN MODE) OR match (descr,nomweb,nomserie) against ('mankai marsala') ) > 0 AND (fmt_w BETWEEN 18 AND 28) AND (fmt_h BETWEEN 28 AND 38) |
SELECT MAX(`search`.`idserie`) idserie, `search`.`cod04`, MAX(`search`.`id_tm`) id_tm, MAX(`search`.`codprecio`) codprecio, MAX(`search`.`tipomaterial_es`) tipomaterial_es, MAX(`search`.`tipomaterial_en`) tipomaterial_en, MAX(`search`.`tipomaterial_fr`) tipomaterial_fr, MAX(`search`.`tipomaterial_de`) tipomaterial_de, MAX(`search`.`id_stm`) id_stm, MAX(`search`.`subtipo_es`) subtipo_es, MAX(`search`.`subtipo_en`) subtipo_en, MAX(`search`.`subtipo_fr`) subtipo_fr, MAX(`search`.`subtipo_de`) subtipo_de, MAX(`search`.`nomserie`) nomserie, MAX(`search`.`nomweb`) nomweb, MAX(`search`.`fmtpieza`) fmtpieza, MAX(`search`.`fmtserie`) fmtserie, MAX(`search`.`fmtserie_in`) fmtserie_in, MAX(`search`.`id_tp`) id_tp, MAX(`search`.`orden`) orden, MAX(`search`.`tp_orden`) tp_orden, MAX(`search`.`visualizacion`) visualizacion, MAX(`search`.`serie_w`) serie_w, MAX(`search`.`serie_h`) serie_h, MAX(`search`.`fmt_h`) fmt_h, MAX(`search`.`fmt_w`) fmt_w, MAX(`search`.`descr`) descr, MAX(match (descr,nomweb,nomserie) against ('mankai* marsala*' in BOOLEAN MODE) + match (descr,nomweb,nomserie) against ('mankai marsala') ) AS priority FROM `vives_db`.`search` WHERE ( match (descr,nomweb,nomserie) against ('mankai* marsala*' in BOOLEAN MODE) OR match (descr,nomweb,nomserie) against ('mankai marsala') ) > 0 AND (fmt_w BETWEEN 18 AND 28) AND (fmt_h BETWEEN 28 AND 38) GROUP BY cod04 ORDER BY priority DESC , id_tp ASC , idserie DESC , fmtserie DESC , nomserie ASC , tp_orden , nomweb , id_tm ASC;