Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/282.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
警告:mysql_fetch_array():在第22行的/home/a3332804/public_html/lib/configuration.php中,提供的参数不是有效的mysql结果资源_Php_Mysql_Phpmyadmin - Fatal编程技术网

警告:mysql_fetch_array():在第22行的/home/a3332804/public_html/lib/configuration.php中,提供的参数不是有效的mysql结果资源

警告:mysql_fetch_array():在第22行的/home/a3332804/public_html/lib/configuration.php中,提供的参数不是有效的mysql结果资源,php,mysql,phpmyadmin,Php,Mysql,Phpmyadmin,警告:mysql_fetch_array():在第22行的/home/a3332804/public_html/lib/configuration.php中,提供的参数不是有效的mysql结果资源 在数据库中上载php时出错 <? session_start (); if (!$stop_eval) { global $c; if(is_dir('install/')) { header("Location: install/");

警告:mysql_fetch_array():在第22行的/home/a3332804/public_html/lib/configuration.php中,提供的参数不是有效的mysql结果资源

在数据库中上载php时出错

<?


  session_start ();

  if (!$stop_eval)
  {

    global $c;
    if(is_dir('install/'))
    {
    header("Location: install/");
    }



    if(defined('DB_DETAILS') && $c && !$error_log) {

    if(!$_SESSION['setting'])
    {
    $setq = mysql_query("SELECT * FROM settings");
    while ($r=mysql_fetch_array ($setq))    - this is the line 22 in my database 
    {
    $set[$r[set_name]] = $r['set_value'];
    $_SESSION['setting'][$r[set_name]] = $r['set_value'];

此错误表示您的查询失败

由于缺少/错误的表或字段,您的查询可能会失败。要查看详细错误,请打印mysql_error()的结果


mysql_*库已弃用。建议升级到MySQLi或PDO。

在这段代码之前,您是否正确连接到数据库

你应该吃点类似的东西

mysql_connect("localhost", "user", "pass") or die(mysql_error());
mysql_select_db("") or die(mysql_error());

真正地当您编写问题时,相关侧窗格中显示的900000个重复项中没有一个与您相关?警告:
mysql\u query
是一个过时的接口,不应在新的应用程序中使用,因为它将在未来的PHP版本中删除。一个现代的替代品。如果您是PHP新手,像这样的指南可以帮助您解释最佳实践。如果这是新代码,甚至不用费心修复这些错误,而是切换到使用现代接口来执行查询。