title: SQLSTATE[42000]: Syntax error or access violation: 1065 Query was empty (SQL: )
body: <p>I have PHP class as follow:</p>
  
  <pre><code>class SearchAttributeDao extends BaseDao
  {
      private $SELECT_CATEGORY_FILTER_BY_IDS;
  
      function __construct()
      {
          $this-&gt;table_name = 'categoryattributes';
          $this-&gt;SELECT_CATEGORY_ATTR_BY_IDS = "SELECT csa.attributeid, atn.name FROM "
              .$this-&gt;table_name.
              " csa join attributenames atn on csa.attributeid = atn.attributeid where csa.categoryid in (?); ";
      }
  
      public function getListByCatIds(array $catIds)
      {
          //...
          $attr_list = $this-&gt;executeSelectQuery($this-&gt;SELECT_CATEGORY_FILTER_BY_IDS, [$catIds]); //Error on this line
          //...
      }
  }
  </code></pre>
  
  <p>So when I executes my application I get an error stating:</p>
  
  <blockquote>
    <p>SQLSTATE[42000]: Syntax error or access violation: 1065 Query was empty (SQL: )
        ...
        at BaseDao->executeSelectQuery(null, array(array('10523', '10524', '10606', '10423', '10533', '10618'))) in SearchAttributeDao.php line 24</p>
  </blockquote>
  
  <p>The stacktrace above suggest that <code>SELECT_CATEGORY_FILTER_BY_IDS</code> is null or empty but I have set it in constructor. What I have done wrong?</p>