Skip to content
Advertisement

Tag: sql-server

Can Microsoft’s SQLSRV driver for PHP run on Apache?

Scenario: I have a PHP website running on Apache server I have an ERP system (MS SQL) that runs on a different server I need to connect from my website to that MS SQL server I need to work with Microsoft SQL Server in my PHP application. I’ve managed to get their SQLSRV driver for PHP running on my localhost

SQL – Select doesn’t retrieve results

I’m using sqlsrv_num_rows in order to check if a user exists in the DB. When i’m running the query in my DB i’m getting 1 result, but in my PHP I’m not getting anything (echo doesn’t print anything). Why is that? Example query I’m using PHP and MSSQL. Answer Explanations: Function sqlsrv_num_rows() requires a client-side, static, or keyset cursor, and

PHP/MSSQL: query result to table

I’m trying to return results from a MS SQL query, into a table. But somehow I only get a blanc page with the headers. I don’t know what i’m doing wrong or where to search for an answer. Could someone please direct me in the right way. Help is appreciated Answer What I think is that $dbh->query($sql) is the reason

SQL-Server Select returning null on PHP

I have a query that returns all the data while running at MSSQL, but when I try to get the result with php code it returns null SELECT: PHP CODE: Answer I’ve found the problem The problem was the encoding, I put the $query inside of utf8_encode(), and now it is returning the results. Thank you all for your time.

Advertisement