php怎么调用两张表的数据?字段都一样,这样写,article_a_2和article_a_1各一篇文章,内容却都一样显示article_a_2的文章内容。怎么解决??
有朋友说给表定义一个别名就可以,请问怎么定义别名??
如果解决问题,会追加酬金的。
$this->initPackage($arow, false);
$this->chapters = array();
$sql = 'SELECT * FROM ' . ddddd_dbprefix('article_a_2'); ddddd_dbprefix('article_a_1') . ' WHERE articleid = ' . intval($this->id) . ' ORDER BY chapterorder ASC';
$res = $query->execute($sql);
while ($crow = $query->getRow($res)) {
$this->chapters[] = $crow;
}
$this->createOPF();
}