我对编码有点陌生,并且一直在尝试编写我认为简单的 sql 查询。请帮忙 :)
Table 1: Users
id = user idt
username = user name
Table 2: Orders
orderid = order id
order_to = user id of person buying
order_from = user id of person selling
oder_details = text
基本上我想:
"Select Username(from), Username(to), order_details FROM mytables WHERE Order id = 1;"
并将结果作为 1 行,我不知道如何进行。我以为我可以通过连接或其他方式做到这一点......有人可以帮忙吗?