【发布时间】:2014-03-10 09:35:45
【问题描述】:
如何使用这 2 个连接来运行连接 2 个表的查询?
yesno.table1 和 sushi.table1 ?假设我们通过id 加入,他们都有相同的ID。
我该怎么做?
// Connect to Yesno Database
$this->yesno_db = new mysqli("red", "yesno", "***", "yesnotmp");
if ($this->yesno_db->connect_errno) {
throw new Exception('Connection failed: '.$this->yesno_db->connect_error);
}
// Connect to Sushi Database
$this->sushi_db = new mysqli("red", "sushi", "***", "sushi");
if ($this->sushi_db->connect_errno) {
throw new Exception('Connection failed: '.$this->sushi_db->connect_error);
}
【问题讨论】: