我正在开发PhpStorm来开发我的Prestashop网站,我无法解决这个问题.我在localhost上工作并成功将PhpStorm连接到我的
MySQL服务器.
现在,PhpStorm会抛出诸如“无法解析表’${_ DB_PREFIX_} cms’”之类的警告. Prestashop使用表名的前缀,似乎PhpStorm无法解析那些带前缀的表.
这有解决方法吗?
以下是Prestashop-1.6源代码示例:
$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`';