A PHP extension which allows you to access Microsoft SQL Server databases. It was available until PHP 5.3 (on Windows) and removed in PHP 7.0.0.
Questions tagged [php-mssql]
54 questions
0
votes
2 answers
Current time from SQL Server to PHP for compare
Need get info, is EndDate expired or not (EndDate is row, where typed info about date of buyed user premium)
connectuser2db();
$bile_sql = "SELECT EndDate FROM tbl_rfuser WHERE Serial = '" . $userdata['serial'] . "'";
if (!($bile_result =…

20 20
- 3
- 1
0
votes
1 answer
Sum $total in Loop PHP when mssql_query("COMMIT") success insert data to database?
I'm trying to "sum" $total in loop.
This is the full code:
foreach ( $array_permall as $perm ) {
if($lastcheck != "1" && $checkoutlet != 1){
//izin gagal
echo "2";
exit();
}else{
$total = 0;
$sqlIns =…

Kirito
- 1
0
votes
1 answer
Executing stored procedure with IN and OUT parameters in PHP
I want to execute a stored procedure into my PHP code, this stored procedure has an IN and an OUT parameter. The stored procedure is this:
USE [phl_pmx]
GO
DECLARE @return_value int
EXEC @return_value =…

Maikel
- 3
- 2
0
votes
2 answers
SQL Server fetch data php
I want to pull the data in the database by connecting to SQL Server. I can connect to SQL Server but I can't print the data. I get blank screen output. What is the problem?

SH Yazılım Geliştirme
- 844
- 3
- 11
- 19
0
votes
1 answer
Xampp php 5.6 mssql_connect() Fatal error: Call to undefined function mssql_connect()
I am using Xampp with PHP version 5.6. I was trying to connect using mssql_connect() function from the mssql PHP extension. But it shows me the error:
mssql_connect() Fatal error: Call to undefined function
mssql_connect()
Can anybody help me…

erenchristian
- 3
- 1
- 6
0
votes
2 answers
Mssql fetch array show error in while loop
I'm write a query for take some result in mssql server ,that working but now they some errors ,the error is
Warning: mssql_fetch_array(): 3 is not a valid MS SQL-result resource
in
my connection query is working and there is no problem, my…

Shambu
- 73
- 1
- 9
0
votes
1 answer
PHP SQL Server Not Generating Error or Working
I am new to PHP, so I apologize for the ignorance. I have tried to connect PHP to my SQL Server database on my computer. I would like for the table to be displayed on a webpage, so this is early testing and learning. My code is

baskinsr
- 61
- 2
- 16
0
votes
1 answer
cant connect to mssql server or sqlsrv not showing up on phpinfo
I have problem to connect to SQL server. I did all the steps from here and I already changed the php.ini configuration file:
;On windows:
extension_dir = "D:\xampp\php\ext"
But I still can't connect, my PHP Version is 7.2.11. I tried with…

Tri
- 25
- 1
- 9
0
votes
0 answers
MS SQL Server Azure - PHP msssql_connect() connect to different database than master
I am restricted to use only PHP mssql module to use with
MS Azure SQL Server.
I am able to maintain connection by adding:
~/.freetds.conf:
[aftermath]
database = mydatabase
host = myhostname.database.windows.net
port = 1433
tds…

Aftermathx25
- 1
- 2
0
votes
2 answers
Fatal error: Call to undefined function mssql_connect() in C:\AppServ\Apache24\htdocs\C_DBHandler.inc using apache 2.4 and php5.6
i upgradefrom php version 2.2 to 2.4 and php 5.6 too. The problem is with the new php the function does not support mssql_connect so i installed the new driver for sqlsvr and when i made the Database connection it work fine.
I need some help. How…

klk2000
- 13
- 7
0
votes
2 answers
How can I connect mssql server and get values with php
I'm a newbie on php and I try to make a calendar for people travel information from db and want to show these info on the calendar's day so my problem is to connect MSSQL Server and take the values form db.My php pages work on localhost(wampp) and…

Nuisance
- 286
- 1
- 2
- 15
0
votes
2 answers
pdo connect convert to MSsql and fetch data
I had such code, which works fine and I need to get same result then I convert my database connection
$dbh = new PDO('mysql:host=localhost;dbname=DB', 'root', '');
$dbh->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 1);
$stmt =…

Dmitri
- 23
- 6
0
votes
1 answer
Call php function via ajax when user navigates away from page
I have a web app where I need to call a php function with parameters when the user navigates away from the page. This functionality doesn't need to be too sophisticated, simply when the user clicks another link on the page or goes to a different…

wonderstruck80
- 348
- 2
- 13
0
votes
1 answer
How to pass parameter into stored proceedure from php
I have a stored Proceedure 'spGetOrderByID' in the sql server.
Which gives a record according the given order id.
And the stored proceedure is working fine , while i trying in the sql server.
This is the php code iam using
$this->_connectionString…

Linto P D
- 8,839
- 7
- 30
- 39
0
votes
1 answer
Use PHP to set column description in MSSQL
I'm working on a web app that is using PHP and MSSQL. One of my requirements is to use the field descriptions in MSSQL in part of the web app.
I know the Stored Proc. for adding descriptions in MSSQL is:
EXEC sp_addextendedproperty
@name =…

mcfrosty
- 13
- 5