Does there exist a package like WAMP, but with SQL Server instead of MySQL? I'd be happy to work with either ASP or PHP, but PHP doesn't always play nice with开发者_运维百科 SQL Server and ASP doesn't work with WAMP...so I'm doubtful on this.
I need this because I'm developing an IMS and it will eventually be hosted on an apache server, yet they require I use SQL Server (stupid...I know).
Thanks for any help!
I don't think there is anything like that.
But I suggest to install a Xampp instance: http://www.apachefriends.org/en/xampp.html
And connect to a running instance of SQL Server using the MSSQL package (already integrated in Xampp) http://php.net/manual/en/book.mssql.php
$myServer = "localhost";
$myUser = "your_name";
$myPass = "your_password";
$myDB = "examples";
//connection to the database
$dbhandle = mssql_connect($myServer, $myUser, $myPass)
or die("Couldn't connect to SQL Server on $myServer");
//select a database to work with
$selected = mssql_select_db($myDB, $dbhandle)
or die("Couldn't open database $myDB");
//declare the SQL statement that will query the database
$query = "SELECT id, name, year ";
$query .= "FROM cars ";
$query .= "WHERE name='BMW'";
//execute the SQL query and return records
$result = mssql_query($query);
精彩评论