title: SQL query syntax error near ''
body: <p>I'm trying to use Magento theme and when I import the theme data I get an sql error that says </p>
  
  <pre><code>SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2, query was: 
  
  SELECT `#__cms_page`.* 
  FROM `#__cms_page`
  INNER JOIN `#__cms_page_store` AS `cms_page_store` 
      ON #__cms_page.page_id = cms_page_store.page_id 
  WHERE (`#__cms_page`.`identifier`='home-demo-01') 
    AND (is_active = 1) 
    AND (cms_page_store.store_id IN (0, 1)) 
  ORDER BY `cms_page_store`.`store_id` DESC 
  LIMIT 1
  </code></pre>
  
  <p>I can't seems to find the problem as it says the syntax error is near nothing..</p>