All Questions
22,168
questions
0
votes
0
answers
17
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)...
7
votes
9
answers
780
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 ...
-1
votes
0
answers
27
views
To view the history of errors using PDO in SQL [duplicate]
I have created a system using PDO for SQL but there is a small typo error in the field. This has caused the data not to be saved to SQL. The user has filled out dozens of data entries and I just ...
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
...
-6
votes
0
answers
24
views
Select Count doesnt count on PHP [duplicate]
$sql_back_adet = "SELECT COUNT(backlink) AS backlink FROM sites";
$stmt_ba = $db->query($sql_back_adet);
if ($stmt_ba->num_rows > 0) {
while ($row = $stmt_ba->fetch_assoc()) {...
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 ...
0
votes
0
answers
18
views
Php pdo_sqlite extension installation error
I installed php 8.2 on my raspberry pi 4, the installation was successful, and I then installed the SQLite extensions through apt. I uncommented the correct lines in the php.ini file, and php itself ...
0
votes
1
answer
52
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 ...
0
votes
1
answer
45
views
Transform a multidimensional array from PDO to two simple arrays for a chart [duplicate]
I have a MariaDB with articles and each article has a date. I want to display a bar chart with number of articles per date.
I get the data with this code:
$statement = $pdo->prepare(
" SELECT
...
-2
votes
2
answers
92
views
Create json-encoded array from a PDO query result column
I am creating a json array with data from mysql:
$array = $db->query("SELECT ...")->fetchAll(PDO::FETCH_ASSOC);
print json_encode($array);
This returns:
[{"animal":"...
-3
votes
1
answer
33
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 ...
0
votes
2
answers
34
views
MYSQL PDO lat lon searching with multiple in clause
I cannot rack my brain around how to construct this sql query.
I have 3 tables.
Users table
user_id
name
picture
etc
tag_ref table
user_id
tag_id
geolocation table
user_id
geolat
geolon
What ...
79
votes
11
answers
598k
views
PHP Connection failed: SQLSTATE[HY000] [2002] Connection refused
I am trying to use a PHP connection to connect MySQL Database which is on phpmyadmin. Nothing fancy about the connection just trying to see whether the connection is successful or not. I am using MAMP ...
-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){
...
0
votes
0
answers
31
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 ...