具体资料:
Select * from Table where 是否归还='否' and 借书时间=today
Select * from Table where 是否归还='是' and 还书时间=today
//其中today为你具体的时间的函数,这根你的数据库有关
统计:
Select Count(*) from Table where 是否归还='否' and 借书时间=today
Select Count(*) from Table where 是否归还='是' and 还书时间=today
控件用query--datasource---dbgrid
Select * from Table where 是否归还='否' and 借书时间=today
Select * from Table where 是否归还='是' and 还书时间=today
//其中today为你具体的时间的函数,这根你的数据库有关
统计:
Select Count(*) from Table where 是否归还='否' and 借书时间=today
Select Count(*) from Table where 是否归还='是' and 还书时间=today
控件用query--datasource---dbgrid
但这还是有点问题,关键是怎样用DBGRID显示出来,因为你用的是俩条SQL语句,怎么把它集中表示出来呢!
union
Select * from Table where 是否归还='是' and 还书时间=today
如何?