I am using below query and expecting all records having projects with ‘arab’ word but it shows me some other results: Dubai Waterfront (Dubai)
SELECT CONCAT(mp.id,‘-1’) as id, CONCAt(mp.project,’ (‘,mp.emirate,’)') AS name, mp.project as masters,‘2’ as sorder FROM master_project_index mp INNER JOIN project_index p ON ( mp.id = p.master_project_id ) WHERE MATCH(p.project) AGAINST (‘arab*’) GROUP BY name LIMIT 0,10
I have applied full text index on project field of both above mentioned tables.
How can i use this query to see all the records having arab word as like query LIKE ‘%arab%’
Try formatting the SQL query with three backticks on a new line, before and after you script , It makes it easier for others to spot the problem:
SELECT
CONCAT(mp.id,'-1') AS id
, CONCAt(mp.project,' (',mp.emirate,')') AS name
, mp.project AS masters
, '2' AS sorder
FROM master_project_index mp
INNER JOIN project_index p ON ( mp.id = p.master_project_id )
WHERE MATCH(p.project)
AGAINST ('arab*')
GROUP BY name LIMIT 0,10