ft_min_word_len in MySQL on SHARED SERVER
I was wondering if it is possible to adjust the variable ft_min_word_len in MySQL on a SHARED SERVER. 开发者_如何转开发The default value is 4, i need to change it to 2, i have spoken with my hosting company they say they cant change.
So my question is can it be changed using ini_set in PHP or something in .htaccess ?
Please help
ft_min_word
is a setting of the MySQL server. You cannot therefore change it in the ini_set
(which isfor PHP).
The server is a seperate thing, and if your host has multiple users using the same server (which is standard on a shared server), they will use the same setting.
The same goes for a .htaccess
setting: this can only change how apache
will react (if allowed to change), not how the database server is configured.
The variable, described here in the manual is not a dynamic variable that can be set in runtime
Check the length of the search term, then, if it is less than allowed by ft_min_word, use LIKE('%searchterm%')
Even better, if possible, index the first couple of characters of the column and use LIKE('searchterm%')
精彩评论