0
我有一個記錄,其中firstname
等於\
。出於某種原因,它沒有給我留下記錄。當使用匹配語句使用轉義斜線時Mysql未返回結果
SELECT
firstname,lastname,middlename,
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
FROM contacts
WHERE (
MATCH(firstname,middlename,lastname,
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) AGAINST ('\\*' IN BOOLEAN MODE)
OR personal_address_zipcode REGEXP('(\\*)')
OR company_address_zipcode REGEXP('(\\*)')
OR home_phonenumber REGEXP('(\\*)')
OR company_phonenumber REGEXP('(\\*)')
OR cell_phonenumber REGEXP('(\\*)')
OR birthday_day REGEXP('(\\*)')
OR birthday_year REGEXP('(\\*)')
)
AND addressbook_id = 4
當你說一個選項文件,你的意思是php.ini中? – jkushner
@jkushner。 。 。不,這是MySQL的選項文件。你可以在這裏閱讀它:http://dev.mysql.com/doc/refman/5.6/en/option-files.html。 –
如果我將它更改爲1,它會大大影響性能嗎? – jkushner