クエリごとに並べたい。ウェブサイトの私の問題は以下の通りです。
データベースにニューステーブルがあり、テーブルには順序と日付の列があります。
今日の日付までのニュースをニュースの順序で表示したいと思います。
例: XXXx ニュースの順序は 1 で、yyyy ニュースの順序は 1 で、zzzz ニュースの順序は 1 で、aaa ニュースの順序は 2 です。
この値を昇順で表示したので、結果は
xxxx
yyyy
zzzz
aaaa
別のニュース、つまり bbbb と order 1 を追加すると、zzzz の下に表示されます
すなわち
xxxx
yyyy
zzzz
bbbb
aaaa
しかし、私は結果が欲しい
bbbb
xxxx
yyyy
zzzz
aaaa
注:日付は同じ日付です。今日の日付
どうすればこれを入手できますか? お知らせ下さい