Solusi sederhana:
SELECT *
FROM projects
WHERE
CONCAT(category,name,description,keywords,type) LIKE '%query%'
ORDER BY name ASC;
Anda dapat menambahkan pemisah antar kolom jika diperlukan:
SELECT *
FROM projects
WHERE
CONCAT(category,"|",name,"|",description,"|",keywords,"|",type) LIKE '%query%'
ORDER BY name ASC;
Anda juga dapat menggunakan pencarian teks lengkap (Anda perlu membuat indeks teks lengkap seperti yang dijelaskan di sini:Bagaimana cara kerja INDEKS FULLTEXT pada beberapa kolom? )
SELECT *, MATCH (category,name,description,keywords,type) AGAINST ('query') AS score FROM projects WHERE MATCH (category,name,description,keywords,type) AGAINST ('query');