简体   繁体   English

无限日期滚动-WebSql JavaScript

[英]Infinite date scroll - WebSql JavaScript

Is there a built in method for infinite date scrolling? 是否有用于无限日期滚动的内置方法?

I am making a database program, and the point is to display data added over especific dates. 我正在制作一个数据库程序,重点是显示在特定日期添加的数据。 Of course I can't do this forever in time: 当然,我不能永远做到这一点:

SELECT * FROM TABLE WHERE date >="2013-04-01" AND date <"2013-05-01

Plus, the month days change every year. 另外,每年的月份都在变化。 You guys have an idea of how should I implement my code to adjust into the dates? 你们有一个想法,我应该如何实现我的代码以适应日期?

Not sure what you mean by infinite scrolling, but if you're displaying data based on a date range, just pass the date parameters from the UI to the query. 不确定无限滚动的含义,但是如果您要基于日期范围显示数据,只需将日期参数从UI传递到查询即可。 If you are displaying 1 month of data at a time, then the user could use Previous / Next button to 'scroll' through time. 如果您一次显示1个月的数据,则用户可以使用“上一个” /“下一个”按钮来“滚动”时间。 Or you could let them pick any two dates and see whatever range they need to look at. 或者,您可以让他们选择任何两个日期并查看他们需要查看的范围。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM