Page 1 of 1

Search Engine Question

Posted: Tue Mar 03, 2009 12:45 am
by TFCameron
I'm sure you have all heard this a thousand times. I am new to the whole PHP and mySQL programming. I just wanted to get your opinion on what would be the solution for a search engine for a website I am working on.

The search needs to be able to search for entries in the mySQL database that relational? I think that's the word I need to use. What I mean is that, people will enter text for one part of the search and select a value from a drop down box and these two things need to be grouped together.

I hope I explained in a way that you can somewhat understand. Any help you can offer would be GREATLY appreciated.

Thank you

Re: Search Engine Question

Posted: Tue Mar 03, 2009 1:35 pm
by pickle
I'm not 100% sure what you need.

Do you want people to type in 1 word for their search, then have a second word be pulled from a <select> box?

Re: Search Engine Question

Posted: Tue Mar 03, 2009 4:45 pm
by TFCameron
Yeah that's exactly what I mean.

Re: Search Engine Question

Posted: Tue Mar 03, 2009 4:49 pm
by pickle
Well, when they submit their form, what they typed in and what was selected in the pulldown box will both be in $_POST. Just concatenate those two variables & throw it in your query.

Re: Search Engine Question

Posted: Tue Mar 03, 2009 5:25 pm
by TFCameron
Okay, but best way to make the search script would be to do it by hand right? I've heard of things can do it for you and wasn't sure if that would be better than doing it myself.

Re: Search Engine Question

Posted: Tue Mar 03, 2009 5:38 pm
by pickle
"better" is a subjective term. For my money I'd do it yourself as it's pretty simple & any third party solution would probably be bloated beyond what you need.