I want to integrate the MySQL full-text search function in my PHP site.
Now I have the following problem.
SELECT *
FROM testtable t1, testtable2 t2
WHERE MATCH (
t1.firstName, t1.lastName, t1.details, t2.firstName, t2.lastName, t2.details
)
AGAINST (
'founder'
);
And I have an error code:
Do you know why and how to solve it?
Many thanks!
Edit:
I accept the RageZ method:
SELECT *
FROM testtable t1, testtable2 t2
WHERE MATCH (
t1.firstName, t1.lastName, t1.details
)
AGAINST (
'founder'
) OR MATCH( t2.firstName, t2.lastName, t2.details) AGAINST (
'founder'
);
And I have a new question. If I want to find content that:
AGAINST('founder', 'initiator', 'employee');
How to write a request?
Well, I know that there can only be one criterion.
AGAINST('founder');
source
share