View Single Post
Old 08-10-2008, 11:59 PM   #1 (permalink)
delayedinsanity
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default Building a MySQL search

I'm wondering if there's any good tuts out there on building a localized search within PHP/MySQL, and I'm also wondering if it's worth my time to actually build one for a system that's already MySQL based...

There's two main fields in my DB that I'd want to search on, 'summary', and 'description'. Unless there's some built in MySQL trickery that I can use with LIKE or WHERE, that it might be worth my time to build a script which will spider my database for keywords and write another table which would store the keywords, where they were found, and how often they were found for each page.

My dilemna at this point is whether or not I should do a row for row database (for each row in the first, there would be a corresponding row in the second which would just include keywords), or if I should do a keyword based table that would include a list of rows in the first db that they were found in.

Further to that, I need to figure out how to prioritize my results. I'm searching Hotscripts to look for similar things I can dissect, but so far everything I've turned up is based on spidering your site, and doing a site search. I guess the theory remains the same though, I'm just spidering a database table and doing a localized return for that table...

I'd like to build this ground up though, for the learning experience I'll get, and my primary question is are there any good tutorials or blogs for tips and tricks I might try and utilize in my endeavours. Secondary to that, do any of you have any tips or ideas from experience on how I should go about building the database for this?
-m
delayedinsanity is offline  
Reply With Quote