问题描述
在下表中,名为lecture_table
---------------------- -------
|一天|开始|结束|
| ------------- + ------ + ------ |
|星期天| 8.5 | 10.5 |
-----------------------------
i试试
i有一个开始时间的网页搜索页面,我想键入讲座时间,如08:30 AM而不是8.5,然后将此值转换为8.5,如上表所示。
结果我希望在开始时间显示为08:30 AM,在结束时间显示为10.30 AM。所以我应该使用什么样的查询来获得这样的结果
--------------------- ---------------
|一天|开始|结束|
| ------------- + -------- + ----------- |
|星期天| 08:30 AM |上午10:30 |
------------------------------------
in the below table which is named as lecture_table
-----------------------------
| day | start | end |
|-------------+------+------|
| Sunday | 8.5 | 10.5 |
-----------------------------
i try to
i have a web search page of start time and i want to type lecture time such as"08:30 AM" instead of 8.5 then this value converted to 8.5 like in the table above.
the result i want to be shown like "08:30 AM" for start time and "10.30 AM" for end time. so what a query should i use to get a result like this
------------------------------------
| day | start | end |
|-------------+--------+-----------|
| Sunday | 08:30 AM| 10:30 AM |
------------------------------------
推荐答案
这篇关于PHP / MySQL从表中选择数据并以不同的形式显示结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!