我正在尝试运行一个查询,该查询现在在本地服务器上脱机工作,当我将我放在服务器上时,我得到这个错误。它似乎在查询搜索数据库时遇到问题,并且不确定哪个部分正在执行此操作。此外,该表不在infomation_schema
任何建议或提示将不胜感激。我对php或mysql没有太多的经验。谢谢
致命错误: 未捕获的 PDOException: SQLSTATE[42S02]: 未找到基表或视图: 1109 在 /storage/ssd2/815/information_schema 12196815/public_html/classes/DB.php:11 堆栈跟踪: #0 /storage/ssd2/815/12196815/public_html/classes/DB.php(11): PDOStatement->execute(Array) #1 /storage/ssd2/815/12196815/public_html/create-account.php(27): DB::query('SELECT username...', Array) #2 {main} 抛入 /storage/ssd2/815/12196815/public_html/classes/DB.php 联机11
private static function connect() {
$pdo = new PDO('mysql:localhost;dbname=id12196815_findomevents;charset=utf8', 'id12196815_findomevents', 'Findomevents');
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
return $pdo;
}
public static function query($query, $params = array()) {
$statement = self::connect()->prepare($query);
$statement->execute($params);
if (explode(' ', $query)[0] == 'SELECT') {
$data = $statement->fetchAll();
return $data;
}
}
UYOU