Leider ist mein Deutsch zu schwach, um mein Problem zu beschreiben, so muss ich English benutzen, weil mein Problem PHP betrifft.
I'm new to PHP and web servers, but I have a basic understanding of databases. I'm using MS SQL Server and trying to find out how to query one of my databases via PHP. Since I'd like to test all queries on my local machine first, I downloaded XAMPP. So now I need to establish a connection to my database, and PHP that comes with XAMPP doesn't seem to be able to run mssql_% functions as the server says this:
Fatal error: Uncaught Error: Call to undefined function MSSQL_CONNECT() in C:\xampp\htdocs\my_stuff\db_connection.php:6 Stack trace: #0 {main} thrown in C:\xampp\htdocs\my_stuff\db_connection.php on line 6
For reference, the syntax in the corresponding PHP file is as follows:
- Code: Select all
<?php
$hostname = "MyPC\Username";
$username = "dbo";
$dbName = "test_db";
MSSQL_CONNECT($hostname,$username) or DIE("DATABASE FAILED TO RESPOND.");
mssql_select_db($dbName) or DIE("Database unavailable")
?>
What could be the issue? I assume my PHP just isn't configured to read mssql% functions. How do I fix this?
Thank you!