gpt4 book ai didi

postgresql - ErrorException pg_query() : Query failed: ERROR: relation "5432posts" does not exist LINE 2: FROM "5432posts"

转载 作者:行者123 更新时间:2023-12-04 19:28:04 24 4
gpt4 key购买 nike

所以我一直在尝试使用 Postgresql + Nginx 使用 CodeIgniter 4 设置 CRUD
我目前将数据库文件设置为。

database.default.database = igniter_db
database.default.username = user_igniter
database.default.password = pass123
database.default.DBDriver = Postgre
database.default.DBPrefix = 5432
和 app/config/database 作为
            'hostname' => 'localhost',
'username' => 'user_igniter',
'password' => 'pass123',
'database' => 'igniter_db',
'DBDriver' => 'Postgre',
'DBPrefix' => '',
'pConnect' => false,
'DBDebug' => (ENVIRONMENT !== 'production'),
'charset' => 'utf8',
'DBCollat' => 'utf8_general_ci',
'swapPre' => '',
'encrypt' => false,
'compress' => false,
'strictOn' => false,
'failover' => [],
'port' => 5432,
Error code

最佳答案

这是因为您已配置:

database.default.DBPrefix = 5432
因此,现在您所有的表都以 5432 为前缀。5432 应该是端口,如果您不想为表添加前缀,可以将 DBPrefix 留空。
谢谢

关于postgresql - ErrorException pg_query() : Query failed: ERROR: relation "5432posts" does not exist LINE 2: FROM "5432posts",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69148069/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com