Last updated July 25, 2013. Created on July 25, 2013.
Edited by eosrei. Log in to edit this page.

Drupal's database abstraction layer cannot directly access columns named using spaces or reserved words: #1426084: Provide backtick escaping for MySQL in DB abstraction layer.

You can fix your source database column names or use the following workaround to specify the column name specifically. In this example, fulltext is a SQL reserved word.

$query = Database::getConnection('default', 'joomla_migrate')
  ->select('jos_content', 'jc')
  ->fields('jc', array('id', 'title', 'introtext', 'created', 'modified'));
$query->addExpression('`fulltext`', 'full');

Looking for support? Visit the forums, or join #drupal-support in IRC.