【发布时间】:2021-06-07 22:39:47
【问题描述】:
谁能帮我按日期而不是按年显示我的代码 我的数据是每天的计划,我想像表格一样按周总结它
"SELECT EmployeeName,AssignedArea,SectionName,TimeSchedule,YEARWEEK(ScheduleFrom) as ScheduleFrom
from tblschedule
WHERE ScheduleFrom BETWEEN '" + clsSQLcon.DateFrom1+"' AND '"+clsSQLcon.DateTo1+"'
[1]: Here is the sample of my output but i want it by date
| Employeenames | 2021-03-01 | 2021-03-08 | 2021-03-15 | 2021-03-22 |
|---|---|---|---|---|
| Candare | time& section for the week | time& section for the week | time& section for the week | time& section for the week |
| Mendoza | time& section for the week | time& section for the week | time& section for the week | time& section for the week |
| Jocson | time& section for the week | time& section for the week | time& section for the week | time& section for the week |
【问题讨论】:
-
首先通过使用参数化查询修复 SQL 注入错误。 没有充分的理由通过连接用户输入来构造查询
-
我不知道怎么...
标签: c# mysql database mysql-workbench