|
|
|
|
|
|
|
|
|
|
|
SELECT g.* FROM sy__good g WHERE g.fk_ctgy1_no=2 and g.flag_show=1 and flag_modify=0
and
(
( flag_sell=2 and TO_DAYS(sell_date1)<=TO_DAYS('2022-10-27') and TO_DAYS('2022-10-27')<=TO_DAYS(sell_date2) )
or
( flag_sell=1 and TO_DAYS(sell_end)<=TO_DAYS('2022-10-31') and TO_DAYS('2022-10-01')<=TO_DAYS(sell_end) and sell_week='' )
)
ORDER BY g.sell_date1 ASC, g.sell_end DESC, g.price ASC LIMIT -20,20
|
|
|