Hope someone can help as I am having a hard time understanding how to query properly
I have a Member table and a Member_Card table. Member_Card has a column Member, so the card is associated to a member. Both tables have a LastModifiedDate column. A member can have none, one or several cards.
I need to return all members whose LastModifiedDate >= sinceDate (given date) OR whose card (if any) LastModifiedDate >= sinceDate.
Imagine sinceDate is 2013-01-01 00:00:00. I want to output something like this:
[{
"Id": "001O000000FsAs7IAF",
"LastModifiedDate": 2013-01-01 00:00:00,
"Member_Card": null
}, {
"Id": "001O000000FrpIXIAZ",
"LastModifiedDate": 2012-12-12 00:00:00,
"Member_Card": [{
"Id": "
最后
以上就是安静咖啡最近收集整理的关于mysql中where后left,使用WHERE子句的MySQL LEFT JOIN查询的全部内容,更多相关mysql中where后left,使用WHERE子句的MySQL内容请搜索靠谱客的其他文章。
发表评论 取消回复