Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $sql = "SELECT title,created,work_company,
- IF(count(city_id) > 1,'Multiple cities',city.city_name) as city,
- IF(job_type =1,'Full time','Part time') as Job_type
- FROM work_history
- JOIN content ON content.owned_user = work_history.user_id
- JOIN job ON content.content_id = job.content_id
- join job_city ON content.content_id = job_city.content_id
- JOIN city ON city.id = job_city.city_id
- WHERE content.type =6 AND work_history. current_working = 1";
- if(!empty($filters['cataegory'])){
- $sql .=" AND job.category = ".$filters['cataegory']."";
- }
- if(!empty($filters['type'])){
- $sql .=" AND job.job_type = ".$filters['type']."";
- }
- if(!empty($filters['city'])){
- $sql .=" AND city.id = ".$filters['city']."";
- }
- if(!empty($filters['min_salary'])){
- $sql .=" AND job.min_sallary >= ".$filters['min_salary']."";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement