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