In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!
SELECT COUNT(*) AS score, /* list out all jobs columns here that you want */
FROM jobs LEFT JOIN businesses ON jobs.business_id = businesses.business_id
WHERE MATCH (job_title, job_blurb, job_facility, business_name)
AGAINST ('$string' IN BOOLEAN MODE)
GROUP BY /* list out all jobs columns here that you want */
ORDER BY score DESC
SELECT COUNT(*) AS score, jobs.job_id,
jobs.job_title,
jobs.job_blurb,
jobs.job_facility,
max(jobs.job_entry_date) as max_job_entry_date,
businesses.business_name
FROM
jobs LEFT JOIN businesses ON jobs.business_id = businesses.business_id
WHERE
MATCH
(job_title, job_blurb, job_facility, business_name)
AGAINST
('$string' IN BOOLEAN MODE)
GROUP BY
jobs.job_id,
jobs.job_title,
jobs.job_blurb,
jobs.job_facility,
businesses.business_name
ORDER BY
score
DESC
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.