在LEFT JOIN表上CONCAT两个字段

时间:2013-05-09 00:52:13

标签: mysql

有没有办法通过下面的查询从左连接表中CONCAT两个字段?

以下查询实际上给了我内部服务器错误

SELECT job.id as job_id, job.title, job.start_date, job.end_date, organisation.name, jobsboard.name, CONCAT(jobsboard.website, '/?id=', job.id)
            FROM job
            LEFT JOIN portfolio_job_category pjc ON pjc.job_id = job.id
            LEFT JOIN category c ON c.id = pjc.category_id
            LEFT JOIN organisation ON organisation.id = job.organisation_id
            LEFT JOIN portfolio jobsboard ON jobsboard.id = pjc.portfolio_id
            WHERE job.end_date >= DATE( NOW( ) ) 
            AND pjc.portfolio_id = $portfolio
            GROUP BY job.id
            ORDER BY job.id DESC

0 个答案:

没有答案