$sql = 'select count(a.id) from tableA as a inner join tableB as b on a.Bid = b.id where b.member_sn = ? and a.status = ?';
$stmt = new Zend_Db_Statement_Mysqli($dbAdapter, $sql);
$stmt->execute(array($var1, $var2));
$row = $stmt->fetch(); //單筆資料用fetch(), 多筆用fetchAll()
沒有留言:
張貼留言