1
我无法将我的查询放入zf2查询中,我可以适合简单的连接查询但我无法写入更复杂的子查询。 请帮我做到这一点。如何将复杂的mysql查询合并到zf2中
SELECT `created_date` FROM `salesmodule_discussed_topic` dt WHERE dt.`meeting_id` IN(
SELECT ma.`meeting_id` FROM `salesmodule_meeting_agent` ma WHERE ma.`agent_id`=30547
)
public function getLastmeetingdate() {
$select = new Select();
$select->from(array('dt' => 'salesmodule_discussed_topic'));
$select->columns(array('created_date'));
$select->where(array('ma.`agent_id` => 30547));
$resultSet = $this->tableGateway->selectWith($select);
return $resultSet->buffer();
}
'WHERE b1.connected_booking_id ='$ id'' MySql Injection – newage