我的Joomla网站崩溃了这个错误的SQL代码

时间:2013-01-22 05:12:05

标签: mysql joomla database-connection joomla2.5

所以我的joomla网站崩溃了把这个错误扔给我,奇怪的是,在另一个州的同一时间在我的网站上的另一个人仍然让我的网站为他工作正常...当我尝试保存信息时崩溃在数据库中发布..下面是错误,我将非常感谢并永远感谢任何提示解决这个问题!谢谢 !!顺便说一下,我是从星巴克浏览它,每个人都在用wifi ...

Error loading module MySQL server has gone away SQL=SELECT m.id, m.title, m.module, m.position, m.content, m.showtitle, m.params, mm.menuid FROM pwo3d_modules AS m LEFT JOIN pwo3d_modules_menu AS mm ON mm.moduleid = m.id LEFT JOIN pwo3d_extensions AS e ON e.element = m.module AND e.client_id = m.client_id WHERE m.published = 1 AND e.enabled = 1 AND (m.publish_up = '0000-00-00 00:00:00' OR m.publish_up <= '2013-01-22 04:58:42') AND (m.publish_down = '0000-00-00 00:00:00' OR m.publish_down >= '2013-01-22 04:58:42') AND m.access IN (1,1,2,3) AND m.client_id = 0 AND (mm.menuid = 207 OR mm.menuid <= 0) ORDER BY m.position, m.ordering

Warning: Invalid argument supplied for foreach() in /home/content/72/9959172/html/libraries/joomla/database/database/mysql.php on line 383

Warning: Invalid argument supplied for foreach() in /home/content/72/9959172/html/libraries/joomla/database/database/mysql.php on line 383

Warning: Invalid argument supplied for foreach() in /home/content/72/9959172/html/libraries/joomla/database/table.php on line 406
An error has occurred.
The requested page cannot be found.
Home Page

If difficulties persist, please contact the System Administrator of this site and report the error below.

1 个答案:

答案 0 :(得分:0)

Warning: Invalid argument supplied for foreach()

您应该使用 is_array 函数检查传递给foreach的内容是否为数组

如果您不确定它是否为数组,您可以随时使用以下PHP示例代码进行检查:

if (is_array($variable)) {

  foreach ($variable as $item) {
   //do something
  }
}

这意味着你的SQL也有错误,因为据我所知,它没有向foreach返回任何数据。确保您的SQL正确无误。