我是postgresql的新用户,我想访问位于模式中的名为Paths的表,如下图所示:
在pgadmin中,此请求有效:
select * from "Schemas"."Paths"
但我无法在php中使用它。
到目前为止我已经尝试过了:
pg_prepare($connection, "my_query", "Select * from \"Schemas\".\"Paths\"");
pg_execute($connection,"my_query");
但它不起作用......
编辑: 我没有错误,当我尝试时,我只是得到NULL:
var_dump(pg_fetch_array(pg_execute($connection,"my_query")));
答案 0 :(得分:1)
pg_prepare($connection, "my_query", 'Select * from "Schemas"."Paths"');
pg_execute($connection,"my_query");