regarding PHP & MySQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • roomii
    New Member
    • Feb 2010
    • 1

    regarding PHP & MySQL

    Hi all,

    I'm fairly new to PHP & MySQL. I have a PHP search that I built on my site, but now I'm realizing I need to use full text searching because I have so many tables and entries that will need to be searched from.

    I have multiple tables joined into my search. At the moment this is what I have to return results:

    WHERE asmnt_parcel.Ac count = '{$search}' OR asmnt_parcel.Ow nersName = '{$search}' OR asmnt_parcel.Pa rcelID = '{$search}' OR asmnt_legal.Leg al = '{$search}' OR appr_miscimpr.A ccount = '{$search}'


    I realize this is going to slow things down big time, since I'll have to do that for all 8 or 9 tables I have joined in, since certain account numbers are in one table, but aren't in another table.

    So . . . . I have some questions on full text searching.

    I've read several tutorials and it seems like a fairy easy concept. But, I have a few questions to help my understanding of this:

    -- Since I have multiple tables that I've joined into my search, do I need to put the MATCH or WHERE MATCH statements at the end of every table I have joined in?
    -- Are the AGAINST statements necessary? I assume so. If so, how do I make it so that it is just a wildcard or something along those lines, so that it'll return any search that is put in? Like, for example, there are thousands of Account numbers and they are all different, I can't list every single one in the code, so that it is pulled up when searched. I'm sure there's a way where I can just use a $search or something at that point and not have to put the exact word that needs to be searched. See where I'm a little confused? How do I do that?
    -- Do I need to index every field in the tables that I want to be fulltext searched?

    Looking forward to your positive response...

    Roomii.
  • mwasif
    Recognized Expert Contributor
    • Jul 2006
    • 802

    #2
    Short answers to your questions. I am sleepy at the moment
    Originally posted by roomii
    -- Are the AGAINST statements necessary?
    Yes
    Originally posted by roomii
    -- Do I need to index every field in the tables that I want to be fulltext searched?
    Originally posted by roomii
    how do I make it so that it is just a wildcard or something along those lines, so that it'll return any search that is put in?
    Use * (for more)

    Comment

    Working...