"tablegateway with multiple from tables" Code Answer


I hope this will help you along your journey as this is a working example I have:

namespace PoolModel;

use ZendDbTableGatewayAbstractTableGateway;
use ZendDbSqlSelect;

class IpaddressPool extends AbstractTableGateway
    public function __construct($adapter)
        $this->table = 'ipaddress_pool';

        $this->adapter = $adapter;


    public function Leases($poolid)
        $result = $this->select(function (Select $select) use ($poolid) {
                ->join('account', 'account.accountid = ipaddress_pool.accountid', array(
                ->join('product_hosting', 'product_hosting.hostingid = ipaddress_pool.hostingid', array(
                ->join('webaccount', 'webaccount.webaccountid = ipaddress_pool.webaccountid', array(
                ))->where->equalTo('ipaddress_pool.poolid', $poolid);

        return $result->toArray();

Answers related to “tablegateway with multiple from tables”

Only authorized users can answer the search term. Please sign in first, or register a free account.