Join two tables and filter them with where clause

后端 未结 2 1412
悲&欢浪女
悲&欢浪女 2021-01-29 10:23

I have problem getting the SQL output I want.

I have two tables like this:

tblOrder

ID    User    Status
1      1         0
2           


        
2条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-29 10:38

    The main problem I found that I had done was write O.ID = OI.ID instead of O.ID = OI.OrderID. Thats why I only got one row per ID. I should have seen that but I only thought of other problems. Thanks for the help!

提交回复
热议问题