问题描述
这里我创建了一个BLOG网站。我的要求是在前端我有这些控件
日期:
消息:
关键词:
主题:
提交(按钮)
我们进入所有领域然后按提交数据将存储在数据库中并显示仅消息和日期。
赞赞
2014:
一月
Febraury
三月
。
。
。十二月
当我们选择一月时它会显示一月份的消息与明智的月份。
我希望你能理解。请帮助我
Here iam creating one BLOG site.My Requirement is In Front end i have these controls
Date:
Message:
Keywords:
Subject:
Submit(Button)
we entering all fields and press Submit The Data Will be Stored in DB and displays Only Message and Date.
Like
2014:
January
Febraury
March
.
.
.December
When we select january it shows the Messages in January month with Date Wise.
I hope you understand.pls help me
推荐答案
SELECT * FROM Posts WHERE MonthOfPost = 'January'
这是一个例子,用于获取1月份的帖子。要在订单中显示它们,您可以使用ORDER BY子句,如下所示
This is an example, to get the posts from the january month. To show them in an order, you can use ORDER BY clause, like this
SELECT * FROM Posts WHERE MonthOfPost = 'January' ORDER BY TimeOfPost
要按降序显示它们,您可以使用 DESC
在查询的ORDER BY子句的末尾。
To show them in an descending order, you can use the DESC
in the end of the query's ORDER BY clause.
这篇关于以日期显示数据显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!