4KAStorForum Forum SQL

xiaoxiao2021-03-06  51

48 hours (click) SELECT TOP 20 * from [4k_forum_threads] where datediff (hour, datecreated, getdate ()) <= 48 Order by Hits DESC

48 hours (press reply) SELECT TOP 20 * from [4k_forum_threads] where datediff (hour, datecreated, getdate ()) <= 4ORDER by Resplies DESC

A week of datediff (day, datecreated, getdate ()) <= 7

January

Datediff (day, datecreated, getdate ()) <= 30

转载请注明原文地址:https://www.9cbs.com/read-116061.html

New Post(0)