Hi,
When i try to get data from the Microsoft SQL database and check the results, the values become strange numbers, instead of the data that is displayed in the sql server studio.
i don’t know what i’m doing wrong, and when i try it using an mysql database it works fine…
Here’s the code:
require(“data_connector.php”);
require(“db_sqlsrv.php”);
$serverName = “**”;
$connectionInfo = array( "UID" => "*", "PWD" => "**", "Database"=>"spaarndam");
$res = sqlsrv_connect( $serverName, $connectionInfo); // <- SS authentication
if( $res )
{
echo “Connection works!.\n”;
echo "string";
}
else
{
( print_r( sqlsrv_errors(), true));
}
$data = new DataConnector($res,“SQLSrv”);
$data-> render_sql(“SELECT TOP 1000 [ROLEID]
,[DESCRIPTION]
FROM [TIMENET].[dbo].[ROLE]”);
?>
When i check the data it retrieves, its displayed as
instead of the roles i speficied in the database (Admin, employee etc…)
Can anyone tell me what i’m doing wrong?
Thnx in advance!