|

03-05-2007, 05:50 AM
this is result from just extra field selection:
SELECT p.id, p.owner, p.title, p.featured, p.section, p.shortDescription, p.display, p.description, p.price, p.dateadded, p.expiration, p.pBold, p.pHighlighted, u.state, u.city, u.country,u.phone FROM class_holidaysproducts AS p INNER JOIN class_holidaysproducts_fields ON p.id = class_holidaysproducts_fields.pID AND ( sValue LIKE '%Golf%') LEFT JOIN class_holidaysusers AS u ON p.owner = u.id WHERE p.expiration > NOW() AND p.display = 'Y' AND p.section IN (17, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188) AND p.price BETWEEN 0 AND 9999999 GROUP BY p.id, p.owner, p.title, p.featured, p.section, p.description, p.dateadded, p.expiration, u.state, u.city, u.country HAVING count(sValue) = 1 ORDER BY featured DESC, p.dateadded DESC
results from just text search:
SELECT p.id, p.owner, p.title, p.featured, p.section, p.shortDescription, p.display, p.description, p.price, p.dateadded, p.expiration, p.pBold, p.pHighlighted, u.state, u.city, u.country,u.phone FROM class_holidaysproducts AS p LEFT JOIN class_holidaysusers AS u ON p.owner = u.id WHERE p.expiration > NOW() AND p.display = 'Y' AND p.section IN (17, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188) AND (p.title LIKE '%golf%' OR p.shortDescription LIKE '%golf%' OR p.description LIKE '%golf%') AND p.price BETWEEN 0 AND 9999999 GROUP BY p.id, p.owner, p.title, p.featured, p.section, p.description, p.dateadded, p.expiration, u.state, u.city, u.country ORDER BY featured DESC, p.dateadded DESC
result from extra field selection and text search:
SELECT p.id, p.owner, p.title, p.featured, p.section, p.shortDescription, p.display, p.description, p.price, p.dateadded, p.expiration, p.pBold, p.pHighlighted, u.state, u.city, u.country,u.phone FROM class_holidaysproducts AS p INNER JOIN class_holidaysproducts_fields ON p.id = class_holidaysproducts_fields.pID AND ( sValue LIKE '%Golf%') LEFT JOIN class_holidaysusers AS u ON p.owner = u.id WHERE p.expiration > NOW() AND p.display = 'Y' AND p.section IN (17, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188) AND (p.title LIKE '%golf%' OR p.shortDescription LIKE '%golf%' OR p.description LIKE '%golf%') AND p.price BETWEEN 0 AND 9999999 GROUP BY p.id, p.owner, p.title, p.featured, p.section, p.description, p.dateadded, p.expiration, u.state, u.city, u.country HAVING count(sValue) = 1 ORDER BY featured DESC, p.dateadded DESC
Costa del Sol
Spain
v3.1.4b Developer
�Powerful you have become, the dark side I sense in you.�
|