I have a funny problem look at this:
CASE 1:
$sql_fields = "namn";
$sql_words = "martin -andrew";
$sql = "SELECT * FROM photos WHERE MATCH ($sql_fields) AGAINST ('$sql_words' IN BOOLEAN MODE)";
GENERATES:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
CASE 2:
$sql = "SELECT * FROM photos WHERE MATCH (namn) AGAINST ('martin -andrew' IN BOOLEAN MODE)";
GENERATES:
what i want... (the photo im searching for)
QUESTION:
Why is it like that?
the same sql statement but one of them doesnt work... why? I need CASE 1 to work!
what do i have to do?
"SELECT ...".$sql_fields." [bla bla] ".$sql_words." [bla bla] " doesnt work either! WHY?
if i print out the complete sql line from both cases they look perfectly alike!! WIERD!