mysql - Match statement spaced words return results from multiple columns -


in situation, want find records contain name steve in 1 column , email@email.com in another. know im missing operator, dont know which

            select firstname,lastname,middlename,company_name,                      primary_emailaddress,alternate_emailaddress,personal_address_line1,                     personal_address_line2,personal_address_city,facebook_username,                     twitter_username,googleplus_username,linkedin_username,                     personal_website_url,birthday_month,notes,personal_address_zipcode,                     company_address_zipcode,home_phonenumber,company_phonenumber,                     cell_phonenumber,birthday_day,birthday_year,hash,image_file              contacts              (                 match(                     firstname,lastname,                     primary_emailaddress,alternate_emailaddress,personal_address_line1,                     personal_address_city,company_name,                     company_address_line1,company_address_city,                     facebook_username,twitter_username,googleplus_username,linkedin_username,                     personal_website_url                 )                 against ('steve email@email.com' in boolean mode)) 

match faster like comparison. think can twice in where clause:

        select firstname,lastname,middlename,company_name,                  primary_emailaddress,alternate_emailaddress,personal_address_line1,                 personal_address_line2,personal_address_city,facebook_username,                 twitter_username,googleplus_username,linkedin_username,                 personal_website_url,birthday_month,notes,personal_address_zipcode,                 company_address_zipcode,home_phonenumber,company_phonenumber,                 cell_phonenumber,birthday_day,birthday_year,hash,image_file          contacts          match (firstname) against ('steve' in boolean mode) > 0 ,                match (primary_emailaddress, alternate_emailaddress)                      against ('email@email.com' in boolean mode) > 0; 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -