解决“er_bad_db_error: unknown database 'my_db_01.getloonwh_users'"错误
在服务器返回错误“er_bad_db_error: unknown database 'my_db_01.getloonwh_users'”时,可能是使用 sql 语句时出现了数据库名或表名错误。
分析代码:
const sql = 'selece * from my_db_01.getloonwh_users where username=?&&usernumber=?'
在此处,sql 语句开头使用了 selece 而不是正确的 select。此外,选中表的方式也存在错误。正确的写法应该是:
const sql = 'select * from my_db_01.getloonwh_users where username=? and usernumber=?'
修改后,就不会出现“er_bad_db_error: unknown database 'my_db_01.getloonwh_users'”错误。
以上就是如何解决服务器返回“ER_BAD_DB_ERROR: Unknown database 'my_db_01.getloonwh_users'”错误?的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号