Your
$conn
variable is populated with the result of
sqlsrv_connect()
which is a
resource and not a
class. To use the
$conn
variable you'd need to use the sqlsrv_ functions, such as:
$results = sqlsrv_query($conn, "your query");
The methods that you're describing look like they're from the
PDO[
^] class, which you create using
new PDO(..);
instead.