Jump to content

Archived

This topic is now archived and is closed to further replies.

Mr Chris

A search tutorial?

Recommended Posts

Hi Guys,

I'm looking for a search tutorial to help me understand how I could explore the possibility of building a search page with fields, such as:

http://jobsearch.monster.co.uk/
http://www.fish4.co.uk/iad/jobs/advanced
http://www.primelocation.com/uk-property-for-sale/

Could anyone point me in the direction of any URLS?

Many Thanks

Share this post


Link to post
Share on other sites
I don't have any URLs specifically... but it really comes down to understanding your database and how to use SQL effectively.  If you know those 2 things and how to build a simple HTML form and display the results, then you're all set.  If you don't understand the display part, do a search or look at the tutorials on our main site: www.phpfreaks.com  This has been covered literally hundreds of times.

Share this post


Link to post
Share on other sites
Thanks,

I do understand PHP & Mysql quite well, but I'm not sure about searching a database with conditions.

For example I know how to write a simple php form and output the results back on a page when submit is hit - that's NOT linked to a Mysql database.

But for example, if I had a form and I was searching for a Car ie: 'Seat Ibiza'

i'm not sure how to:

1) Get the form to look in the database and return all results from rows where make='seat_ibiza'.

Then also on these forms there will be other conditions, ie searching for a 'seat ibiza' that is 'red'

2)So I need some kind of tutorial with IF/else statements to show how to achieve something like this.

See what I mean?  Any tutorial links for anything like this will be handy if you could post them please people? In the meantime i'll look through phpfreaks tutorials.

Many Thanks

Chris

Share this post


Link to post
Share on other sites
just make a lil bool isin() function using mid() to automatically check a passage of text for the queried string, i think PhP migh thave such a function built in, but im not quite sure.. if not, it's quite easy to make and seems to me to be self explanitroy, then jus torganise your database in a numerical fassion and use a little for() { } or while() { } loop to search database 1 entry at a time for if(isin(current_cell, $_GET["query"]))


hope this helped... works better and much easier with Ini's than SqL Db's i think

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.