I want to connect a Postgres database with pooling:true. Can we do it with PHP new PDO option? If not are there any reliable options? I want to pass the below parameters(similar) while establishing the connection: Pooling=true;Minimum Pool Size = 2;Internal Command Timeout = 0;Command Timeout = 0; I cannot find any such details in https://www.php.net/manual/en/ref.pdo-pgsql.connection.php Any help will be
Tag: postgresql
pg_insert(): Accepts only string key for values
I’ve got postgres table with an auto-incremental column, and attempting to insert data from PHP with pg_insert returns a string key error. How would I go about modifying this for the different datatypes? Currently returns the following error: A var_dump returns: My Postgres table is made up of: Answer From the PHP manual: pg_insert() inserts the values of assoc_array into
How to use multiple selects in same query without messing everything
So, i have this query which outputs this table then i have this other query which outputs this: All i want to do is place the two columns side by side without bugs. tried this but it returned this: Here is the ER diagram: Answer Ok, Is hard to follow up the logic with the above information, so I can’t
“PDOException: could not find driver” inside docker container where PDO modules exist
I want to run php-fpm in a docker container, but get an error message after starting the container: Fatal error: Uncaught PDOException: could not find driver. I use php7.4 with event engine and a postgres database in a separate container (I use docker-compose to start them all) and are working on ubuntu20.04. The weird thing is: My collegues installed the
Laravel Sanctum returns 500 when trying to access sanctum protected API
I am using Laravel 8.12 with PostgreSQL. I am trying to use Laravel Sanctum as authentication for my API. This is the schema for sanctum: And this is my user table: Now, when I try to send the token in headers, I get this error: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type uuid: “0” (SQL: select
Run a database dump (Restore) from an sql file in PHP + PostgreSql
I’m trying to create a system where a user can create a database and have it populated from a UI, pretty much similar to the installation of most CMS’s. I can programatically create the database but …
ST_WITHIN function does not exist
Im confused on how to use this function within my query. My code that I am using is as follows: When I try run this I get this error: Warning: pg_query_params(): Query failed: ERROR: function st_within(geometry, geography) does not exist HINT: No function matches the given name and argument types. You might need to add explicit type casts. I want
How to select table on DB using a dropdown?
Let’s say that I have two tables on my DB (table1 and table2, and both of them have the same structure. Column | Type | Collation | Nullable | Default | Storage | Stats target | Description —…
DB:Raw not working for date format in postgres
I have the well executed postgres query.I have tried to convert this in laravel but query not executed select id, month, meeting_start_date, call_start_date from mgl_report_targets …
how to save binary type in postgresql
this is php code to save binary data (image,3dmodeling) To store 3d modeling and textures, it was a DB created to manage them in the first place. When sending and receiving a file, the file is not converted . It seems that I have a wrong understanding of bytea that this method is not working properly now, but I am