PHP code example of phphackes / zend-tablegateway-factory

1. Go to this page and download the library: Download phphackes/zend-tablegateway-factory library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

phphackes / zend-tablegateway-factory example snippets


$adapter = $serviceLocator->get('Zend/Db/Adapter/Adapter');
$factory = new TableGatewayFactory($adapter);

$users = $factory->create('users');
$users = $factory->create('users', 'myAuthSchema');

$rows = $users->select([
   'username' => 'admin',
   'password' => 'nimda'
])->toArray();