This topic is locked

Searching query

5/30/2010 12:06:10 PM
PHPRunner General questions
J
JahWobbler author

Is there a way of searching for rows using more than one 'contains' entry?

i.e. I would like to enter 'beach' and 'sunset' to display rows having beach and sunset in a description field.

A
ann 5/31/2010

Hi,
unfortunately PHPRunner do not support full-text search.

J
JahWobbler author 7/10/2010

Any suggestions as to how I could implement
SELECT *

FROM shots

WHERE SDESCRIPTION LIKE '%sunset%' AND SDESCRIPTION LIKE '%boat%'
TIA

J
Jepsen 7/11/2010



Any suggestions as to how I could implement
SELECT *

FROM shots

WHERE SDESCRIPTION LIKE '%sunset%' AND SDESCRIPTION LIKE '%boat%'
TIA


What about doing this:
Include a extra column in the PHPR query. Ie:



SELECT

`SDESCRIPTION`,

`SDESCRIPTION` AS `SDESCRIPTION2`

.....

.....

.....

FROM `shots`


Exclude SDESCRIPTION2 from all views except the search. Then you can apply 2 different search criteria to the same field with all the optionns you have in advanced search.

J
JahWobbler author 7/11/2010



What about doing this:
Include a extra column in the PHPR query. Ie:



SELECT

`SDESCRIPTION`,

`SDESCRIPTION` AS `SDESCRIPTION2`

.....

.....

.....

FROM `shots`


Exclude SDESCRIPTION2 from all views except the search. Then you can apply 2 different search criteria to the same field with all the optionns you have in advanced search.


Great, such an easy and elegant way around the problem!

Many thanks

Albert