我的网站网址是: - http://www.latinwaymusic.it/prestashop/
检查错误: - (1)Db->; executeS()必须仅用于select,show,explain或describe查询
在文件类/ db / Db.php中的第498行
(2)DbCore-> executeS - [第330行 - classes / shop / Shop.php] - [1参数]
(3)ShopCore :: initialize - [第100行 - config / config.inc.php]
(4)要求 - [第27行 - index.php] - [1参数]
答案 0 :(得分:0)
由于某种原因,您的商店域名/网址是空的,您应该检查您的数据库,例如。在phpMyAdmin中,搜索ps_shop_url
表格以及domain
和domain_ssl
www.latinwaymusic.it
类型physical_uri
中/prestashop/
类型Sitecore.Data.Database master = Sitecore.Configuration.Factory.GetDatabase("master");
Sitecore.Data.Items.Item home = master.GetItem("/sitecore/content/home");
Sitecore.Data.Items.Item sampleItem =
master.GetItem("/sitecore/media library/images/sample");
Sitecore.Data.Items.MediaItem sampleMedia =
new Sitecore.Data.Items.MediaItem(sampleItem);
Sitecore.Data.Fields.ImageField imageField = home.Fields["imagefield"];
if (imageField.MediaID != sampleMedia.ID )
{
home.Editing.BeginEdit();
imageField.Clear();
imageField.Src = Sitecore.Resources.Media.MediaManager.GetMediaUrl(sampleMedia);
imageField.MediaID = sampleMedia.ID;
imageField.MediaPath = sampleMedia.MediaPath;
if (!String.IsNullOrEmpty(sampleMedia.Alt))
{
imageField.Alt = sampleMedia.Alt;
}
else
{
imageField.Alt = sampleMedia.DisplayName;
}
home.Editing.EndEdit();
}
并保存该行。
答案 1 :(得分:0)
您正在构建的查询存在问题。你自己更新了代码吗? 查询如下所示:
SELECT s.id_shop, CONCAT(su.physical_uri, su.virtual_uri) AS uri, su.domain, su.main
FROM ps_shop_url su
LEFT JOIN ps_shop s ON (s.id_shop = su.id_shop)
WHERE (su.domain = "". pSQL($HOST)."" OR su.domain_ssl = "". pSQL($HOST)."")
AND s.active = 1
AND s.deleted = 0
ORDER BY LENGTH(CONCAT(su.physical_uri, su.virtual_uri)) DESC
在文件类/ shop / Shop.php第325行的代码中,
WHERE (su.domain = "". pSQL($host)."" OR su.domain_ssl = "". pSQL($host)."")
应该是
WHERE (su.domain = \''.pSQL($host).'\' OR su.domain_ssl = \''.pSQL($host).'\')
您的代码有"" (两次双引号)似乎来自MS SQLServer SQL语法,它永远不会在PHP中工作。