I am trying to change an app from MySQL to Postgres so that we can run it on Heroku.
So at this point I am pretty sure I am connecting to the DB successfully and just trying to run a super simple query, but it is not displaying any rows. Any idea what i might be missing here
$pgConnect = pg_connect("host=[[link to host which is amazon aws url]] dbname=[[dbname]] user=[[username]] password=[[password]]");
$result=pg_query($pgConnect, "SELECT * FROM formdata");
if (!$result) {
echo "query did not execute";
}
if (pg_num_rows($result) == 0) {
echo "0 records"
}
else {
while ($row = pg_fetch_array($result) {
echo $row;
}
}
I am not even getting "query did not execute".