Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result

后端 未结 6 824
耶瑟儿~
耶瑟儿~ 2020-11-21 05:35

I get the error when trying to run this:

query(         


        
6条回答
  •  执笔经年
    2020-11-21 05:54

    // Load settings from parent class
    $settings = SystemComponent::getSettings();
    
    // Get the main settings from the array we just loaded
    $host = $settings['dbhost'];
    $db = $settings['dbname'];
    $user = $settings['dbusername'];
    $pass = $settings['dbpassword'];
    
    //the settings
    $host = 'localhost';
    $db = 'xxx';
    $user = 'xxx';
    $pass = 'xxx';
    

    Did you mean to reassign the connection vars? OR was that a few lines of stub code you forgot to take out? Or just an example to show what $settings contains?

提交回复
热议问题