所以我正在创建一个应用程序,它可以从mysql数据库中获取一个月的所有事件,并将它们添加到日历中。我在数据表atm" dbTable"
中得到了这些事件事件按日期递增
"SELECT * FROM table_events WHERE date BETWEEN '" & startDate & "' AND '" & endDate & "' ORDER BY date ASC"
现在我需要每天查询一天,以检查每个日期最多6个事件,任何建议?我甚至不确定如何查询数据表,更不用说长达31天,并使其有效。
答案 0 :(得分:0)
所以在尝试和阅读之后,我已经弄明白了。感谢大家的投入。
Dim count As Integer
Dim expression As String
Dim foundRows() As DataRow
count = 0
expression = "date = '" & numericYear & "-" & doubleMonth & "-01'"
foundRows = dbTable.Select(expression)
For count = 0 To foundRows.Length - 1
'count = count + "1"
MessageBox.Show(dbTable.Rows(count).Item(5).ToString())
Next count
此示例中的numericYear = 2015和doubleMonth = 06