< First
Last >
namespace Application\Model;
use Zend\Db\TableGateway\TableGateway;
use Zend\Db\Sql\Where;
class HotelTable
{
protected $tableGateway;
public function __construct(TableGateway $tableGateway)
{
$this->tableGateway=$tableGateway;
}
public function fetchAll()
{
$sqlSelect = $this->tableGateway->getSql()->select();
$sqlSelect->columns(array('*'));
$sqlSelect->join('employee', 'employee.id = hotel.hotelId', array(), 'inner');
$resultSet= $this->tableGateway->selectWith($sqlSelect);
return $resultSet;
}
}
< First
Last >