这条语句如下:
select *,(select username from `user` where uid=(select worker from `work` where workname=(select jing from `place` where place=orders.place) and date=curdate())),(select username from `user` where uid=(select worker from `work` where workname=(select flower from `dorm` where dormset=orders.dormset and dormnumber=orders.dormnumber) and date=curdate())),(select username from `user` where uid=(select worker from `work` where workname=(select leaf from `dorm` where dormset=orders.dormset and dormnumber=orders.dormnumber) and date=curdate())) from `orders` where dealdate=curdate();
运行结果如下:
在NaviCat中的运行结果:
Python返回的结果(那个数字是影响行数):
各数据表的数据如下:
dorm表:
orders表:
place表:
user表:
work表:
以及今天是2016年2月22号。
请问为什么没有数据?以及这个查询最好写成什么样子?
人生最曼妙的风景,竟是内心的淡定与从容!