I am working on PhpStorm to develop my Prestashop sites and I cannot solve this problem. I work on localhost and successfully connected PhpStorm to my MySQL server.
Now PhpStorm generates warnings like “cannot resolve table '$ {_ DB_PREFIX_} cms'”. Prestashop uses prefixes for table names, and it seems that PhpStorm cannot resolve these tables with prefixes.
Is there a workaround for this?
Here is an example from Prestashop-1.6 sources:
$sql = 'SELECT c.`id_cms`, cl.`meta_title`, cl.`link_rewrite`
FROM `'._DB_PREFIX_.'cms` c
INNER JOIN `'._DB_PREFIX_.'cms_shop` cs
ON (c.`id_cms` = cs.`id_cms`)
INNER JOIN `'._DB_PREFIX_.'cms_lang` cl
ON (c.`id_cms` = cl.`id_cms`)
WHERE c.`id_cms_category` = '.(int)$id_cms_category.'
AND cs.`id_shop` = '.(int)$id_shop.'
AND cl.`id_lang` = '.(int)$id_lang.
$where_shop.'
AND c.`active` = 1
ORDER BY `position`';

source
share