This is for questions related to getting the PostgreSQL client libraries and PHP extensions working with PHP
Questions tagged [php-pgsql]
89 questions
0
votes
0 answers
pg_query_params returning false
I am using this code to check if an email already exists in the DB, but it returns 'false' everytime (it's working on another website).
pg_query_params("SELECT * FROM a_user WHERE LOWER(user_email) = $1", $params);
After the execution of query,…

d3corator
- 1,154
- 1
- 9
- 23
0
votes
1 answer
pg_query throwing an error
I'm trying to get data from a postgresql database, I get the error: pg_last_error() expects parameter 1 to be resource, object given in /path/to/query.php
So the data is as an object not a resource. Any ideas how to fix this?
The SQL works with…

Spatial Digger
- 1,883
- 1
- 19
- 37
0
votes
1 answer
Doctrine - Error with command database:create or schema:update -f
I need to change some calculations in a CRM but when I've receive the zip file I've unzip it in WAMP, it's use Symfony so I've done the install with composer and update. I'm a beginner with Symfony, Doctrine, ... so I've tried to do the next…

Blouf
- 38
- 6
0
votes
2 answers
Looping through Inserts - PHP Postgres Insert
I am doing inserts via a loop, unfortunately, it seems to insert only a few of the data and ignore some.
I'm reading the contents of a file and inserting them into a postgres database using PHP.
See my code…

George Appiah Sarfo
- 105
- 2
- 12
0
votes
1 answer
php_pgsql package extension is not loaded automatically from /etc/php.d/ directory
I have installed php_pgsql package using the command
yum install rh-php56-php-pgsql.x86_64
I am developing my project with
PHP 5.6.27
PostgreSQL 9.6.1
RedHat 7 OS
instalation was succesful..
Installed: rh-php56-php-pgsql.x86_64…

Telen Stanley
- 310
- 1
- 6
- 16
0
votes
1 answer
Fatal error: Call to undefined function pg_connect()
Today I have updated my MacBook to OS X 10.12
After the update new configs (httpd.config and php.ini) were added and the old configs was renamed previous. I changed the confignames and everything works finde. Everything? No, postgres was not loaded.…

Vinay Emmaadii
- 125
- 1
- 11
0
votes
0 answers
upload file to postgresql Erreur?
I create a form to import file to my data base postgessql but I have this error:
the code is :

oustyle
- 103
- 1
- 10
0
votes
2 answers
How to add pgsql extension to php in Centos 6
I want to add pgsql extension to php in Centos 6.
I've tried uncommenting these lines in my php.ini file with no luck:
extension=php_pdo_pgsql.dll
extension=php_pgsql.dll

Mohsen Abasi
- 2,050
- 28
- 30
0
votes
1 answer
Combine multiple queries in postgres
I have 2 queries.
Query 1:-
select mr.id,count(ml.id) as labor_cnt
from mreq Mr
join mlbr ml on Mr.id = ml.mrid
where Mr.id in(1235,3355)
group by Mr.id
Query 2:-
select mr.id,count(mm.id) as mtrial_cnt
from mreq Mr join mmrm mm on Mr.id =…

Pranav Unde
- 193
- 12
0
votes
1 answer
Cannot find pgsql.so in php.ini
After installed php5-pgsql on Ubuntu using the command
sudo apt-get install php5-pgsql
I couldn't find pgsql.so file in php.ini, when i do a
locate pgsql.so
nothing returns. So anyone knows why the installation shows successful, but the module…

user2628641
- 2,035
- 4
- 29
- 45
0
votes
2 answers
PHP5 - pgsql Module not loaded
I am trying to get work PostgresSQL with PHP, but i stuck on that apache error:
Call to undefined function pg_connect().
When i run phpinfo() i cannot see that my module is loaded, but i do not know why. The pgsql.ini files were loaded. And when i…

Sylnois
- 1,589
- 6
- 23
- 47
0
votes
2 answers
Synology NAS, has File Station application a database and where can I find it?
Has Synology NAS DS212j a database for "File Station" application and where can I find it?
I couldn't find it with phpMyAdmin nor phpPgAdmin.
Some files created in File Station, I could find on the database of Media server in phpPgAdmin.
But those…

iwannaknow
- 1
- 2
0
votes
3 answers
PDOException' with message 'could not find driver'
Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in /home/kholifah/htdocs/cechcalk.ck/userAuth.php:22 Stack trace: #0 /home/kholifah/htdocs/cechcalk.ck/userAuth.php(22): PDO->__construct('?????pgsql:dbna...') #1…

kholifah
- 11
- 2
- 4
0
votes
2 answers
How to pass a set of values for IN clause to pg_execute() arrays
I pass to a function an array of categories and I want to make this query:
$sql = "SELECT *
FROM trans
WHERE id_user = $1 AND id_cat IN ($2)";
$value = array($id_user, implode(",", $categories));
$resource = pg_prepare($db,…

Fabrizio
- 127
- 9
0
votes
0 answers
Steps involved in pg_dump?
I want to know how exactly the pg_dump works step by step. I know that it begins by locking tables. I am currently doing a pg_dump on my database and i switched on the --verbose mode. Here is what i get currently:
pg_dump: finding default…

user3455531
- 775
- 1
- 14
- 28