Skip to main content

All Questions

Tagged with
0 votes
1 answer
53 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 '...
1 vote
3 answers
5k views

Can I integrate a custom PDO wrapper in Laravel

My fellows at work and I are trying to develop a web application using Laravel with a Vertica database. The only problem is that as soon as you use bindValue or bindParam with this specific database, ...
41 votes
7 answers
169k views

How to solve General error: 2006 MySQL server has gone away

I'm doing an operation that inserts hundreds of records into a MySQL database. After inserting exactly 176 records I get this error: [PDOException] SQLSTATE[HY000]: General error: 2006 MySQL server ...
-2 votes
0 answers
44 views

typehint PDOStatement object type incorrectly handled in PHP [closed]

I have a function defined like this in a class that's widely used: /** * Executes a PDO statement and, if any error, logs the sql (with data merged) along with the error message * @param ...
0 votes
1 answer
51 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 ...
0 votes
0 answers
53 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 ...
0 votes
0 answers
76 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 -- ...
0 votes
1 answer
750 views

Php PDO Firebird select sum return wrong result

I have a function that queries a firebird 2.5 database to return a sum of a column. If I execute this select in a query manager all works fine, but the sum result from php code is wrong. For example ...
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 ...
0 votes
0 answers
34 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 ...
0 votes
0 answers
37 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 ...
0 votes
1 answer
644 views

CodeIgniter MySQL escaping [duplicate]

I'm running the following query: INSERT INTO deal (`site_id`, `status`, `slug`, `title`, `description`, `condition`, `sale_price`, `shipping`, `deal_url`, `buy_url`, `start`, `added`) VALUES (?, ?, ?,...
0 votes
0 answers
33 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)...
2 votes
3 answers
376 views

optimization for mass sql insert

I have to insert 100k+ record in the db and I have some memory issues. $_data is an array holding the arrays of data. I even increase the memory size but still got into problems // VERSION 1 ...
0 votes
0 answers
17 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 ...

15 30 50 per page
1
2 3 4 5
1479