
Originally Posted by
r937
you cannot assign a column alias in the WHERE clause, remove the "AS relevance"
copy the MATCH expression, including the alias, into the SELECT clause
Thanks, so I tried:
PHP Code:
select
jobs.job_title,
companies.company_name,
companies.company_url,
companies.logo_thumbnail,
jobs.job_url,
jobs.job_salary,
jobs.job_ote,
jobs.job_perks,
jobs.job_description,
jobs.location,
jobs.date_posted,
industries.industry,
job_types.job_type,
count(applications.id) as applications,
count(featured_jobs.id) as featured,
MATCH(jobs.job_title,jobs.job_description) AGAINST('+pilot' IN BOOLEAN MODE)
from jobs
inner join companies on companies.id = jobs.company_id
inner join industries on industries.id = jobs.industry
inner join job_types on job_types.id = jobs.job_type
left outer join applications on applications.job_id = jobs.id
left outer join featured_jobs on featured_jobs.job_id = jobs.id
where jobs.status='on' group by jobs.id
order by relevance
However, it produces:
PHP Code:
#1054 - Unknown column 'relevance' in 'order clause'
Any idea what's wrong?
Bookmarks