Forum Moderators: coopster

Message Too Old, No Replies

Advanced Search Engine

In PHP

         

bet56

12:05 pm on May 31, 2005 (gmt 0)

10+ Year Member



Hello everybody,

I need advanced search engine in PHP/MySQL, that I can filter results.

For example

Name: (text box)
Country: (drop down)
City: (drop down)
Gender: (drop down)
Minimum age: (text box)

Is there any like this available on net?

Thanks!

mcibor

12:25 pm on May 31, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld!

Why don't you write your own? And this is not advanced search, just plain

The sql query will be something like this:

SELECT id, city, code, name FROM table WHERE city='$city' AND gender='$gender' AND name='$name' ORDER BY id DESC LIMIT 0,20;

That means you are selecting only rows with city='London' (whatever is in $city variable, which you can acquire by posting the formular
$city = mysql_escape_string($_POST["city"]);
The rows are order by input id (the newest is the first) and limited to 20 starting from the 0 row (that's the first row of the answer)

or you can change the WHERE to:
WHERE name LIKE '%$name%'

This will find rows with not exactly $name, eg $name = "anna" but also similar: It will find "anna maria", "joanna", "annalisa".

Hope this helps you somehow
If you still want to find the script look at www.hotscripts.com however you will for sure have to put the script up to your expectations (it won't be exactly the one you look for, as you look for a very specific script)
Best regards
Michal Cibor