我的问题主要是我不确定如何在搜索中说出我需要的内容。
mysql> SELECT * FROM `accounts`;
+----+--------+---------+----------+
| id | status | oplevel | username |
+----+--------+---------+----------+
| 10 | 1 | 0 | root |
| 11 | 1 | 1 | Xylex |
| 12 | 1 | 16 | Anubis |
| 13 | 0 | 16 | Kami |
| 14 | 1 | 16 | Zorn |
+----+--------+---------+----------+
mysql> SELECT * FROM `networks`;
+-----------+-----------+-------------+-----------------+
| networkid | accountid | networkname | serveraddress |
+-----------+-----------+-------------+-----------------+
| 1 | 10 | Fakenet | irc.fakenet.org |
| 2 | 10 | Undernet | irc.under.net |
| 3 | 12 | Takenet | irc.takenet.com |
| 4 | 13 | Examplenet | irc.example.org |
+-----------+-----------+-------------+-----------------+
我有这个帐户表和这个网络表我需要一个查询来返回 IRC 网络的地址,只有当相应的帐户 ID 状态列是 1(启用)
我一直在寻找几个小时。做什么?