0

I'm new to postgresql and i'd like to access a table named Paths located in the schemas as shown in this image :

https://i.sstatic.net/M6aTn.jpg

in pgadmin this request works :

select * from "Schemas"."Paths"

but i can't make it work in php.

i've tried this so far :

pg_prepare($connection, "my_query", "Select * from \"Schemas\".\"Paths\"");
pg_execute($connection,"my_query");

but it didn't work...

Edit: I don't have an error i just get NULL when i try :

var_dump(pg_fetch_array(pg_execute($connection,"my_query")));

1 Answer 1

1
pg_prepare($connection, "my_query", 'Select * from "Schemas"."Paths"');
pg_execute($connection,"my_query");
Sign up to request clarification or add additional context in comments.

3 Comments

Well i had tried without the quotes and it didn't work neither in php nor in pgadmin. Note that i don't have an error but the result is null when i try var_dump(pg_fetch_array(pg_execute($connection,"my_query")));
Ahh ok, i see. It's probably because of the reserve words. Try this (see edit).
hum still not working but i can't even retrieve anything from a metatable. I'm switching to java servlet! thanks anyway!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.