0
我絕對是postgresSQL數據庫的新手。使用PhpPgAdmin,我可以創建數據庫,用戶和表格。我想插入一行到表在我的PHP文件與下面的代碼:在postgres表中授予privilige
$db = pg_connect("$host $port $dbname $credentials");
if($db){
$psql = "INSERT INTO LOGINS (mid, name,ip,date) VALUES ($usid,'$naam','$ipad','$dte')";
$ret = pg_query($db, $psql);
$tot = pg_affected_rows($ret);
}
我收到錯誤: 警告:pg_query():查詢失敗:錯誤:拒絕權限的關係..
我明白一些特權是要聲明的,但是在哪裏以及如何?
而且還有[缺省權限(https://www.postgresql.org/docs/current/static/sql-alterdefaultprivileges.html),以避免授予一切項目。 – Abelisto