Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [pdo]

PDO (PHP Data Objects) is a data-access abstraction layer (interface) for PHP. It works with most database systems.

0 votes
0 answers
64 views

Is it possible for PHP/PDO/MySQL to perform a transaction on its own? [closed]

I have ZERO transaction code in my PHP script. That was done on purpose. My application is too simple to need it. Starting less than a week ago, without any code changes on my part, records written to ...
David Lee Crites's user avatar
0 votes
0 answers
78 views

Using PHP/PDO/MySQL: Records have started vanishing (literally) without changes to the code [closed]

I assume whoever closed this because it "lacked detail or clarity" didn't actually read the whole thing. Or, perhaps, thought I was just an idiot. I know, the subject line makes no sense -- ...
David Lee Crites's user avatar
0 votes
1 answer
55 views

INSERT only if row with specific conditions does not exist - with some concerns about concurrency and atomicity

I need to insert a row in a table only if a row with a specific set of conditions is not already found in that table. Given that this problem is (extremely) common, I searched through answers and came ...
andynewman's user avatar
0 votes
0 answers
36 views

PDO MySQL 5.6 Query Execution Timeout [duplicate]

Going through threads from 2009-2022 it doesn't look like there has been a real answer on getting a query to timeout in PHP from MySQL (5.6). The PDO timeout attribute is for the connecting, not the ...
user3783243's user avatar
  • 5,415
0 votes
1 answer
56 views

In Docker: Fatal error: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cinema.movies' doesn't exist in

I tried to build a container for a PHP-apache app with MariaDB and PhpMyAdmin and i receive the error: Fatal error: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table '...
Flavio's user avatar
  • 11
0 votes
0 answers
35 views

web aplication using php pdo fulltext search delivers result on ubuntu system but not on windows system; identical DB on both

The setting Windows 11 Server-Version: 8.4.0 - MySQL Community Server - GPL Apache/2.4.61 (Win64) PHP/8.3.8 Ubuntu Server-Version: 10.3.39-MariaDB-0ubuntu0.20.04.2 - Ubuntu 20.04 Apache/2.4.41 (Ubuntu)...
Heinz's user avatar
  • 359
0 votes
0 answers
18 views

PHP PDO Query is not returning any results despite SQL query running correctly in MySQL Workbench [duplicate]

I am working on some PHP code where I take a comma seperated string from a user table, and seperate it into a comma seperated string to be inserted into another SQL query to pull the comma seperated ...
AEE's user avatar
  • 1
0 votes
0 answers
44 views

pdo_sqlite extension error Module "sqlite3" is already loaded

I successfully installed PHP 8.2 on a Raspberry Pi 4 and installed the SQLite extensions through apt. I uncommented the correct lines in php.ini. My PHP scripts can read SQLite files but can't write ...
MasterCoder1323's user avatar
0 votes
1 answer
58 views

Not able to show a pdf / image from binary data in MSSQL using PDO LOB

I go MSSQL database which contains attachments - most of them are PDFs. I want to create simple website, that will display attachment after clicking a button. I got main website prepared (there are ...
nequ2k's user avatar
  • 21
-3 votes
1 answer
38 views

PHP XAMPP Config [closed]

I try to connect my php website with a XAMPP Server so I can access my MySQL database. Any Ideas how the config has to look like, because I'm rather stuck with this one. I tried to make a config but ...
Mrco's user avatar
  • 1
-1 votes
0 answers
31 views

Fatal error: Uncaught PDOException: could not find driver for SQLite [duplicate]

I just created a SQLite database 'data.db'. I want to connect it in this php code: <?php $pdo=new PDO('sqlite:./data.db'); $query=$pdo->query('SELECT * FROM posts'); if ($query === false){ ...
Zakaria DOUIH's user avatar
0 votes
0 answers
33 views

Informix PDO assoc_id error SQLSTATE=HY000, SQLDriverConnect: -25546

It has been about half a year that we have been facing an error on our production server. At the beginning it happened every 2-3 months, but last Friday it happened again and today once again. We have ...
Mauricio Hernández's user avatar
0 votes
0 answers
18 views

SQLSTATE[HY000] [2002] No connection could be made because the target machine was selected [duplicate]

I'm trying to connect my windows machine with xampp, using php with PDO, to a server on the local network (Linux) <?php $dbname = "DBNAME"; $user = "USERNAME"; $pass = "...
Abelardo Alves's user avatar
7 votes
10 answers
1k views

Possible bug with PHP PDO and with PostgreSQL

At the startup of the docker application (with laravel php), for 1 request, connection to database is fine. After the first request I start to get this error. SQLSTATE[08006] [7] could not send SSL ...
Harun Barış Bulut's user avatar
1 vote
1 answer
68 views

PHP is not reading .env file

I am using PHP with PDO to connect to my database. I want to start using environment variables, so I used the following terminal command: composer require vlucas/phpdotenv My .env file now contains ...
John Beasley's user avatar
  • 2,853

15 30 50 per page
1
2 3 4 5
1594