Re: Data from 2 columns JimJx <webmaster@valleywebnet.com> wrote in news:1190316521.493308.312510
@k79g2000hse.googlegroups.com:
> Hi all,
> I have what I hope is a simple question....
>
> I have a table with several columns, the 2 I am concerned with at the
> moment are Category and Keywords.
>
> I need to search both of these columns for a word or short phrase that
> I get from a form.
>
> For example, the search can be 'Antiques' or 'Antique Dealers'
>
> I tried to use this
>
> SELECT name, address, city, phone
> FROM valley
> WHERE keywords OR category
> LIKE '%$search%'
> ORDER BY name LIMIT %d,%d"
>
SELECT name,address,city,phone
FROM valley
WHERE keywords LIKE '%$search%'
OR category LIKE '%$search%'
ORDER BY name LIMIT %d,%d |