开发者

How add column order in careers table?

开发者 https://www.devze.com 2022-12-24 04:42 出处:网络
this table i want to create job_iddynamic Jobs Titletext Job Descriptiontext job_Ordercombo box to choose after what job

this table i want to create

job_id            dynamic
Jobs Title        text
Job Description   text
job_Order         combo box to choose after what job 
                    or at first position in the website

i create form to add job and i want to create combo box to choose how will view in first position in career page. i using job_id to choose first position and when select data will call order by job_order

this is true or another solu开发者_运维知识库tion

thank you


Try:

select *, case when job_Order is null then 1 else 0 end as Rank
from job
order by Rank, job_Order, job_id


What I'm reading is this: The user will add a job on one page using job_id as the reference. You're question is how to sort the jobs on the career page? Can you not just "ORDER BY job_Order" when retrieving the data to display on the careers page?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号