Forum Moderators: coopster
set-variable = ft_boolean_default='AND'
which goes into my.cnf
But on a virtual host you can't effect that for just one site can you? I think that has to be done server-wide and it might affect other sites.
It's hard to find documentation on this but I happened to find this:
MySQL reads default options from the following files on Unix:
Filename Purpose
--------------------------------------------
/etc/my.cnf Global options
DATADIR/my.cnf Server-specific options
~/.my.cnf User-specific options
Seems like its similar the inherited behavior for directives with htaccess. If this is possible, where would I put "my.cnf" on a virtual site?
(I am starting to think WebMasterworld could use a seperate MYSQL forum ;) )
$sql = "SET ft_boolean_default='AND'";
//$result = mysql_query($sql);
if (mysql_errno()) echo "MySQL error ".mysql_errno().": ".mysql_error();
// Run search query now...
amznVibe, i take it you mean fulltext search, is it an option to use "in boolean mode"?
select * from x where match('field') against('hi', 'there');
would become
select * from x where match('field') against('+hi +there' IN BOOLEAN MODE);
I know this was not the question, but maybe it helps, i'd like to know the anwer to this question too.
When I try to do:
$sql = "SET ft_boolean_default='AND'";
$result = mysql_query($sql) or die("error - ".mysql_error()); I get:
error - Unknown system variable 'ft_boolean_default' this page: [mysql.com...]
says "It is also possible to change most variables with the SET statement."
so I guess it's one that can't be changed that way...
Unfortunately it's not well documented... sure would be handy though.
Default is 4, and I want it down to 3, so words like "sky" "cat" and "fat" can be selected or filtered in or out. 2 would be too low, but 4 is too high. Sigh, why did they do that!