我想在 table 上显示所有查询,我尝试了两种类型的连接,但我想知道最好的主意
$AModel = new Model_A();
$select = $AModel->fetchAll($AModel->select()->where('user_id like ?', '%9893%' ));
$rowArray = $select->toArray();
echo '<br><hr>A:<br>';
print 'user-id:'. ($rowArray[0]['user_id']);
echo '<br>next</br>';
print ($rowArray[1]['user_id']);
$BModel = new Model_B();
$select_op = $BModel->select()->from($BModel, array('username','email','password'))->where('username = ?', '76' );
$results = $select_op->query()->fetchAll();
$sql = $select_op->__toString();
echo '<br><hr>B:<br>';
echo '<p>My SQL: ' . $results . '</p>';