Mr Chris Posted August 24, 2006 Share Posted August 24, 2006 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/advancedhttp://www.primelocation.com/uk-property-for-sale/Could anyone point me in the direction of any URLS?Many Thanks Quote Link to comment https://forums.phpfreaks.com/topic/18537-a-search-tutorial/ Share on other sites More sharing options...
ober Posted August 24, 2006 Share Posted August 24, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/18537-a-search-tutorial/#findComment-79832 Share on other sites More sharing options...
Mr Chris Posted August 24, 2006 Author Share Posted August 24, 2006 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 ThanksChris Quote Link to comment https://forums.phpfreaks.com/topic/18537-a-search-tutorial/#findComment-79842 Share on other sites More sharing options...
True`Logic Posted August 24, 2006 Share Posted August 24, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/18537-a-search-tutorial/#findComment-79873 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.