WilliamC Posted October 12, 2010 Share Posted October 12, 2010 Hello everyone, I have a unioned query that does not wish to allow ordering by field for some reason. The query itself is: (SELECT * FROM jobs_table_local WHERE (`cID`="1280" OR `scID`="1280") AND `city`="192" AND `state`="319") UNION (SELECT * FROM jobs_table_imported WHERE (`cID`="1280" OR `scID`="1280") AND `city`="192" AND `state`="319") ORDER BY Field(title, 'cna') where the 'cna' would be the keyword searched by. The intention of how this should work would be to return the results with any results where field 'title' contains the keyword 'cna' first, then all other results afterwards. Quote Link to comment https://forums.phpfreaks.com/topic/215676-help-needed-query-refuses-to-order-by-field/ Share on other sites More sharing options...
fenway Posted October 17, 2010 Share Posted October 17, 2010 I don't understand -- what do you men "not allowing". Quote Link to comment https://forums.phpfreaks.com/topic/215676-help-needed-query-refuses-to-order-by-field/#findComment-1122972 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.