0

我不得不将旧的 mambo 站点(基于 joomla)迁移到具有 PHP 5.3 的新服务器。
修复了所有 mambo 问题后,最后一个问题是 hotproperty 高级搜索错误。
这是错误:

Unknown column \'p.type\' in \'on clause\' SQL=INSERT INTO mos_hp_temp (`id`, `price`) \n SELECT p.id, p.price\n FROM mos_hp_properties AS p, mos_hp_companies AS c\n LEFT JOIN mos_hp_prop_types AS t ON p.type = t.id\n LEFT JOIN mos_hp_agents AS a ON p.agent = a.id\n WHERE p.published=\'1\' AND p.approved=\'1\' AND t.published=\'1\'\n AND a.company=c.id\n    AND (publish_up = \'0000-00-00 00:00:00\' OR publish_up <= NOW())\n AND (publish_down = \'0000-00-00 00:00:00\' OR publish_down >= NOW())

为了更好的可读性,我对其进行了一些格式化。

Unknown COLUMN 'p.type' IN 'on clause' sql= 

INSERT INTO mos_hp_temp 
            ( ` id ` , 
             ` price ` ) 
SELECT p.id, 
       p.price 
FROM   mos_hp_properties AS p, 
       mos_hp_companies AS c 
       LEFT JOIN mos_hp_prop_types AS t 
              ON p.type = t.id 
       LEFT JOIN mos_hp_agents AS a 
              ON p.agent = a.id 
WHERE  p.published = '1' 
       AND p.approved = '1' 
       AND t.published = '1' 
       AND a.company = c.id 
       AND ( publish_up = '0000-00-00 00:00:00' 
              OR publish_up <= Now() ) 
       AND ( publish_down = '0000-00-00 00:00:00' 
              OR publish_down >= Now() ) 

我现在无法更新任何东西,所以它不是一个选项。
我该如何解决这个问题?
自然,我检查并 mos_hp_properties 具有类型列。

罗比

4

1 回答 1

0

我发现了问题。
线条

mos_hp_properties AS p,
mos_hp_companies AS c 


应该是相反的顺序。
打开 components/com_hotproperty/hotproperty.php 并使用以下代码更改第 711/712 行:

$sql2 .= "\n FROM #__hp_companies AS c, #__hp_properties AS p "
. "\n LEFT JOIN #__hp_prop_types AS t ON p.type = t.id"

罗比

于 2013-02-07T17:25:19.857 回答