Skip to content
Advertisement

Tag: pdo

How to establish PHP PDO connection with pooling

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

Debian – Apache MySQL PDO issue but all logs are empty

I’m trying to get a project set up and working but I have some issues with my PDO connection. No big deal, however, it doesn’t matter what logs I’m trying to find – they are all empty. within the php file itself, I have ini_set(‘error_log’, ‘/tmp/php_error.php’);. within my sites-enabled config I have the error log defined under ${APACHE_LOG_DIR}/error-domain.log both files

PHP trying to simply a repetitive script involving rowsets

I’m trying to simplify a repetitive script that I’m doing in PHP. I’ve looked at a few loop options but since it involves rowsets being returned from a MySQL stored procedure it’s not acting properly. I’m doing this same script about 15 times to return all the data. Ultimately I’m looking to pass back a json_encode array to the ajax

Counting specific rows after dynamical WHERE clause query in PDO

I’m following this tutorial for a dynamical WHERE clause query in PDO. Let’s suppose I have a short version of the tutorial code, just like this: By adding the line $count = $stmt->rowCount();, I could count the rows. Now let’s suppose I have data like this: If I searched for “Smith” now, I would get 3 results and when I

Advertisement