rbj search script

March 22, 2005 by randomguru 

This morning I decided to redo the Rice Bowl Journals search script, which is the third most used page on RBJ, following the front page (#1) and the members list (#2).

I’m cleaning up the code and streamlining it. HTMLing as much of it as possible (something I should’ve done to begin with but I had loved to code everything in PHP rather than HTML).

The main MySQL query is:

$Search_Query = "SELECT * FROM $RBJ_Members_Table WHERE (

(Site LIKE '%$this_sort%') OR
(Name LIKE '%$this_sort%') OR
(URL LIKE '%$this_sort%') OR
(Photo LIKE '%$this_sort%')

)";

It basically searches through the members table and checks to see if the given search string can be found within the following fields for each member’s information:

Site
Name
URL
Photo

Well, the Photo field is obsolete (back from a time when JPEGs uploaded weren’t converted to the member’s ID number), so I’ll need to delete that… see what I mean by redoing this?

So, today the search script may be down for a few seconds at a time, but by the end of the day it’ll be a much better script.


Comments

Feel free to leave a comment...
and oh, if you want a pic to show with your comment, go get a gravatar!