So Saturday I had a day where all the kids were away and Julie was working her normal weekend hours. I had planned to work on a feature of my blogging software that I have never been happy with. That feature is the search, which only really worked correctly with single word searches. What I discovered is that my PHP programming skills have decayed and my understanding of JavaScript is null and void, not that those skills were very good anyway. Remember I am a hobbyist programmer only, not really my profession. The few hours I spent on the code Saturday virtually were wasted. I spent hours reading about arrays in PHP, not exactly what I had planned. In the end I got a mostly working better search feature. Though I am still not sure I like what I have here, so this project may rear its ugly head again.
I have some JavaScript debugging to do, because if you try and search for something that does not exist in any posts, the form is hijacked and just does not work until you refresh the page. However, the successful searches work great, including a nice sort listing the blog posts first with the most occurrences. This search is still very rough, it works better than my old search feature, but is not 100% really working. I am not sure I like using all the JavaScript I am using, I dig the whole Ajax thing but I worry about it breaking and not being able to fix it.
I kind of thought that I would knock out this feature with PHP5 rather easily and that I could move onto my planned Python programming projects. I never got around to the Python programming at all. If any PHP gurus read this blog and can point me to a great tutorial on building a search feature that searches a MySQL database I would appreciate it. Most of the tutorials I found do a pretty generic search, which is what I originally coded and it did not work well or at all with searches using more than one word. Infact I think my old search feature used more SQL features than PHP. I thought I had read that PHP5 had some added functionality that would make coding a search feature better than ever, using PHP more so than SQL. I could not really find anything that I was happy with or did anything different than I was already doing.