You are here: Grouping WHERE clauses in a SELECT « PHP SQL « IT news, forums, messages
Grouping WHERE clauses in a SELECT

Posted by charliefortune on 11/04/05 16:33

I would like to SELECT, matching a spending limit, a currency, and then
any matched searchwords. I'm not sure if my query below will consider
one searchword match enough to SELECT the item. All 3 clauses must be
met. How would I word my query please, anyone ?


$query = "SELECT id,tracking_url,product,price,description,id_merchant
from product WHERE price < $maxspend AND id_currency = $currency AND
keywords LIKE '%$searchword%' OR product LIKE '%$searchword%' OR
description LIKE '%$searchword%';"

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация