Postgres SELECT FROM

Asked

Viewed 87 times

0

$sql = $Pdo->prepare('SELECT * FROM "Test"." $People"');

Guys I’m trying to give a select using a variable but I need to keep the quotes because I’m working with postgres and it requires the quotes in the variable people

2 answers

1

Try:

$sql = $pdo->prepare('SELECT * FROM \"Teste\".\"$Pessoas\"');

But this is not related to Postgresql.

0


I managed to Solve I used the Code as follows:

$sql = $pdo->prepare('SELECT * FROM "Teste"."'.$Pessoas.'"');

Browser other questions tagged

You are not signed in. Login or sign up in order to post.