我正在尝试执行 MySQL 查询以从 'table2' 中删除行,其中 column = 'value' IF 列在 'table1' = 'value'
我有2张桌子...
表 1 称为“账户”
表 2 称为“库存项目”
'accounts' 的相关列称为 'banned'
'inventoryitems' 的相关列称为 'itemid'
我想 DELETE FROM inventoryitemsWHERE itemid= 2340000
IF... 中的列banned的accounts值为1
额外的信息:
您可以通过名为 的第三张表accounts加入该表。inventoryitemscharacters
表accounts有列:(id主键)和banned。
表characters有列:characterid和accountid(表中的accountid链接)。idaccounts
表inventoryitems有列itemid和characterid(表中的characterid链接)characteridcharacters
希望这可以帮助。