"Super-Search"

Post Reply
digitalphotoworld
User
Posts: 416
Location: Nürnberg/Germany

"Super-Search"

Post by digitalphotoworld »

The actual search in PHPMaker is not very flexible, espacelly if you join tables and try to search for many to many relationship

A little example to make it clear.

We have a table with people and we have a table with cars. Now it is possible that there are people that have only one car, but it is although possible that people have more than one car. Let us assume that the table cars has a field colour that contain the color of the car (red, green, white, silver, blue etc.) and a field brand (BMW, Ford, Toyota etc.)

It is not a problem to build a view that join both tables, but it is not possible to search for complex querys.

If we want to search for all people living in London AND Berlin that have a blue car OR a red car OR a orange car AND the brand of this cars can be Chevrolet, Toyota and Ford, the search from PHPMaker is not able to filter for all this conditions at once.

In mysql we simple can do it like this:
SELECT people., cars. FROM people
INNER JOIN cars ON people.ID = cars.peopleID
WHERE people.place = "London" OR people.place = "Berlin" AND
cars.colour in ("red", "blue", "orange") AND
cars.brand in ("Chevrolet", "Toyota", "Ford")

The new feature "super-search" must give us a list of fields where to choose from the field and another list with the search-operators like ">", "=", "<", "IS NULL" etc.
I have done some screenshots for better understanding what I guess: 666kb.com/i/d06564y56725ofp5t.png


Post Reply