23,774 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
-1
votes
0
answers
37
views
Determining PHP/MySQL encoding differences on 2 machines: MySQL Error 1366 only on one machine [duplicate]
I have some PHP pdo code that is copying data from one table (wp_posts) to another (a relational table structure). This is in the same schema with default
CHARSET=utf8mb4 COLLATE=...
-1
votes
0
answers
124
views
Use of named parameters in MySQL subquery with PHP8 [closed]
I have 2 tables customers and addresses (each customer can have many addresses)
The customers table has two fields of interest:
userName (varchar)
userID (varchar)
The addresses table has two fields ...
4
votes
3
answers
166
views
Connecting to Excel from PHP using PDO
I am connecting to an Excel file from PHP via PDO. When executing a query, Excel returns data, but it defines the first row of results as column names. How do I make Excel return all rows, including ...
4
votes
2
answers
917
views
MariaDB / PDO / PHP 1020 error ("Record has changed since last read in table")
How do I correctly deal with 1020 errors within a transaction in MariaDB?
I recently encounter 1020 "Record has changed since last read in table" errors on code that run without this error ...
-1
votes
1
answer
94
views
Combine 2 tables to create Tree in ExtJS 7
MySQL has 2 tables with the same rows.
For an edit I need one TreeList without true leafs and edit the true leafs separately in a Grid and for the Employees i need one TreeList with the true leafs.
It ...
1
vote
1
answer
109
views
PHP Warning: Unable to load dynamic library 'pdo_sqlite' when running php artisan serve in Laravel 11
I'm encountering a warning when I try to run my Laravel 11 project using the command php artisan serve. The error message is as follows:
PHP Warning: PHP Startup: Unable to load dynamic library '...
-1
votes
1
answer
206
views
How to query parts of a PHP variable separately? [duplicate]
I have an application with a search bar. With the code I have right now, if someone enters the value book 1: conquest into the search bar, the SQL query looks for a column value of ALL the words in ...
-1
votes
1
answer
126
views
Laravel Eloquent fails to insert Unicode (emoji) into NVARCHAR column on SQL Server – only works with query builder [duplicate]
I'm working on a Laravel 8 project that connects to Microsoft SQL Server 2017 (running on Windows Server 2012 R2) using PHP 7.4.9 and the sqlsrv/pdo_sqlsrv drivers. My goal is to insert Unicode ...
2
votes
0
answers
149
views
Illegal mix of collations on basic SELECT query
I got the following error on a simple select query:
[21-May-2025 20:20:52 America/New_York] PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (...
0
votes
0
answers
131
views
php segmentation fault when connecting to Access database
I have Ubuntu 24.04 and php 8.3. I'm trying to connect to an Access DB through PDO ODBC running on the command line. Here is what I have enabled:
$ php -i | grep PDO
PDO
PDO support => enabled
PDO ...
0
votes
2
answers
174
views
Produce a dynamic SQL Server pivot table with PDO PHP?
What I have:
I have a dynamic pivot table in SQL Server named "tis_temp_dsr" that currently holds the following information:
customer_no customer_name jan2025 feb2025 mar2025 total
...
1
vote
0
answers
41
views
PHP PDO-dblib to Sybase ASE via Parallels Desktop - CLI Connects but Browser Fails
I would appreciate it if someone could share a similar experience and/or solution to this problem.
I have this setup for the php dev environment
Mac running apache2.4/php7.4/freetds1.4.26/php-pdo-...
1
vote
1
answer
138
views
Psalm does not detect SQL Injection
I'm trying to use Psalm to detect SQL Injections. I have the following code :
$pdo = new PDO("mysql:host=db;dbname=tp;port=3306", "user", "password");;
// VULNERABLE ...
-1
votes
1
answer
50
views
PDO to draw data from parent tables through the conjunction table
How could you draw data from the parent tables, through the conjunction table using PDO in PHP & MySQL?
I have a Games table with gameId and gameTitle. and a Platform table with platformId and ...
-1
votes
2
answers
108
views
With PHP prepared statements, is there a way to bind a query and have that query executed?
I have the following prepared statement functionality:
$stmt = $db->prepare("REPLACE INTO devices (id, type, labels, graphical, technical) values (:id, :type, :label, :graphical, :...