I'm very new to Zend Framework and php.
I went through the Zend Framework 2 tutorial and tried to use AbstractTableGateway for querying multiple tables.
But got the following message on the web page:
The table name of the provided select object must match that of the table
Here is part of my code:
class PublicationTable extends AbstractTableGateway {
protected $table = 'publication';
public function fetchAll()
{
$sql = new Sql($this->adapter);
$select = $sql->select();
$select->from(array('p' => 'publication'))
->join('author','publication_fk=p.publication_pk');
$resultSet = $this->selectWith($select);
return $resultSet;
}
...
}
I'm aware that the variable "protected $table" is a String. So how can one resolve this? Thanks for the help!
EC