PHP sqlsrv: passing a resource from a function
问题 PHP 5.4.14 SQL Server 2012/SQL Client 2012 Windows 2008 R2 I have a function (simplified version follows) that I call to run a SQL query. It works correctly: connects to DB; runs query and obtains a valid resource. The problem is that the resource that gets returned is null... function squeal($query) { $serverName = "XXXXXXXX\SQLEXPRESS"; $uid = "private"; $pwd = "private"; $connectionInfo = array( "UID"=>$uid, "PWD"=>$pwd, "Database"=>"DBname"); /* Connect using SQL Server Authentication. */