kirk112 Posted May 23, 2008 Share Posted May 23, 2008 Hi, I have the following query, which when I test in phpmyadmin it returns the correct results, but when I use it in the script I get " Unknown column 'score' in 'order clause' " . Really confusing if it works in phpmyadmin then I presume it should work anywhere but............. SELECT j.job_id, jt.job_title, s.salary, lg.location_name, ls.specific_name, LEFT(jat.advert_text,1000) AS advert, DATE_FORMAT(ja.added_on, '%d-%m-%Y') AS date_added , MATCH(jt.job_title,jat.advert_text) AGAINST ('j\"ood Beverage Managery\"' IN BOOLEAN MODE) AS score FROM jobs AS j LEFT JOIN job_titles AS jt ON jt.job_id = j.job_title LEFT JOIN salary AS s ON s.salary_id = j.salary LEFT JOIN location_general AS lg ON lg.location_id = j.location LEFT JOIN location_specific AS ls ON ls.specific_id = j.location_specific LEFT JOIN job_adverts AS ja ON j.job_id = ja.job_id LEFT JOIN job_adverts_text AS jat ON ja.advert_text_id = jat.advert_text_id LEFT JOIN job_adverts_content AS jac ON ja.how_to_apply_id = jac.content_id LEFT JOIN job_adverts_content AS jac1 ON jac1.content_id = ja.header_id LEFT JOIN job_adverts_content AS jac2 ON jac2.content_id = ja.how_to_apply_id LEFT JOIN job_adverts_content AS jac3 ON jac3.content_id = ja.about_us_id WHERE ja.advert_live = 1 AND MATCH(jt.job_title,jat.advert_text) AGAINST ('j\"ood Beverage Managery\"' IN BOOLEAN MODE) ORDER BY score DESC LIMIT 0, 10 Thanks for your help! Quote Link to comment https://forums.phpfreaks.com/topic/106899-query-works-in-phpmyadmin-but-not-on-page/ Share on other sites More sharing options...
fenway Posted May 23, 2008 Share Posted May 23, 2008 That's impossible. Quote Link to comment https://forums.phpfreaks.com/topic/106899-query-works-in-phpmyadmin-but-not-on-page/#findComment-548165 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.