gpt4 book ai didi

php - prestashop 中出现意外的 T_STRING

转载 作者:行者123 更新时间:2023-11-29 21:38:19 26 4
gpt4 key购买 nike

public static function getPressRelease()
{
$res = Db::getInstance()->executeS('
SELECT az.id_album, az.type, az.description, az.id_custom_pages, as.id_image, as.id_album , as.youtube, cp.custom_page_type, cp.title_custom_page
FROM `'._DB_PREFIX_.'azgallery_album` AS az
LEFT JOIN `'._DB_PREFIX_.'azgallery` AS ag
LEFT JOIN `'._DB_PREFIX_.'custom_pages` AS cp WHERE cp.custom_page_type = 'gallery'');
return $res;
}

这行代码给我带来了错误 解析错误:语法错误,process.php 第 121 行出现意外的 T_STRING

最佳答案

您的最后一行使用 ' 作为库字符串,它会破坏您的整个 SQL 字符串。请尝试以下操作:

public static function getPressRelease()
{
$res = Db::getInstance()->executeS('
SELECT az.id_album, az.type, az.description, az.id_custom_pages, as.id_image, as.id_album , as.youtube, cp.custom_page_type, cp.title_custom_page
FROM `'._DB_PREFIX_.'azgallery_album` AS az
LEFT JOIN `'._DB_PREFIX_.'azgallery` AS ag
LEFT JOIN `'._DB_PREFIX_.'custom_pages` AS cp WHERE cp.custom_page_type = "gallery"');
return $res;
}

关于php - prestashop 中出现意外的 T_STRING,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34737754/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com