-3

所以我的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.
4

1 回答 1

0
Warning: Invalid argument supplied for foreach()

foreach您应该使用is_array函数检查您传递给的是一个数组

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

if (is_array($variable)) {

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

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

于 2013-01-22T05:34:43.237 回答