All Questions
Tagged with sql-server php
6,703
questions
-2
votes
0
answers
45
views
Problem connecting to SQL with PHP - This extension requires the Microsoft ODBC Driver for SQL Server to communicate with SQL Server [duplicate]
I'm on a shared hosting platform with Krystal running Ubuntu, trying to connect to an SQL database in house with PHP but I'm getting the error:
Caught PDO exception:
SQLSTATE[IMSSP]: This extension ...
-1
votes
0
answers
34
views
Laravel 10 connects to SQL Server [closed]
This's first time i learn Laravel 10. I want to learn Laravel 10 by using Sql Server Database. When i try to coconnect SQL Server to Laravel 10, it always be failed. I don't know the reasons. I use ...
-2
votes
1
answer
46
views
Connect PHP and SQL Server using Visual Studio Code. using localhost and xampp as well
Where should I place my PHP file? It's currently in a project folder.
I have downloaded the Microsoft SQL Server extension in VSCode but still the undefined problem of couldn't connect the database ...
-1
votes
0
answers
29
views
SQSRV not found in phpinfo()
I have set up the required drivers for SQL server that suits PHP 8.3. but sqlsrv not found in phpinfo() page. whereas, for version 8.1 and 8.2, both are showing it. kindly someone help me to set up ...
0
votes
1
answer
37
views
Laravel migrations create table column with dot in colum name
I have a table in SQL Server database where a column has a dot in its name. When I first created manually the table I had no problems doing it, but now that I'm changing the db server I decided to ...
-1
votes
1
answer
63
views
Function runs slowly (12s) from PHP but quick (sub-second) in SSMS. What are some areas of investigation?
I have a SQL Server function that uses several WITH CTEs to pre-process some data prior to the output in FOR JSON PATH format.
The query runs sub-second in SSMS but is taking twelve seconds when ...
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 ...
1
vote
1
answer
84
views
Strange behavior of symfony doctrine during phpunit test - field becomes null in database
I am using
Symfony v6.4.8
doctrine/orm 2.19.5
phpunit/phpunit 9.6.19
I have build an REST API GET endpoint /api/contract/{$id} in Symfony.
It performs an API request at another system, receiving ...
0
votes
1
answer
55
views
How to Modify PHP Code to Replace Existing SQL Entry Instead of Creating Duplicate?
I have been tasked with fixing some PHP code for a website and believe I found the main snippet that is causing the frustration. When an employee is hired they are entered into the system and given a ...
0
votes
0
answers
66
views
SQL Server 2008/2019 Connection Issue
Connection could not be established.
Not able to connect and execute queries from PHP.
I'm getting this...
Array ( [0] => Array ( [0] => HY000 [SQLSTATE] => HY000 [1] => -2146893042 [code]...
0
votes
1
answer
37
views
PHP PDO SQL Server - Timestamp data type issue
I am upgrading a PHP application from an older 5.4 version to the latest 8.3.8 using PDO SQLSrv to connect to my database. I have a timestamp data type in the database to check if a record has been ...
0
votes
1
answer
141
views
Laravel 11 Connect Microsoft Azure SQL Server on Mac OS Sonoma M1
I am trying to connect Laravel 11 to Microsoft Azure SQL Server on Mac OS Sonoma M1
Before I try to install Microsoft Azure SQL Server Edge (as Microsoft SQL Server alternative for Mac OS with M1 Chip)...
0
votes
0
answers
78
views
Laravel eloquent relationship with binary SQL Server
I have 2 tables in SQL Server.
Table Account:
[id] [binary](13) NOT NULL, [PRIMARI KEY]
[email] [varchar](50) NOT NULL,
....
Table Status:
[numG] [int NOT NULL,
[id] [binary](13) NOT NULL, [PRIMARI ...
0
votes
1
answer
52
views
Discrepancy in SQL_SRV Behavior Across Environments
I have a PHP script on a remote machine that pulls from a Microsoft SQL Server database and inserts the data into a MySQL database. I have a cron job set up to run the script hourly so the MySQL ...
0
votes
0
answers
46
views
PHP Variable contains extra information after SQL Query Execution
I have some weird behavior happening with a parameter passed by reference to a SQL Server Stored Procedure.
I have a variable ($FormType2) in a parameter array passed to the Stored Procedure. When the ...