1

I have a query that is not returning all the rows. I have boiled it down to the description field. Seem like if the description field has special characters it stops returning rows.

I am not sure if it is in this

while ($row = sqlsrv_fetch_array($getResults, SQLSRV_FETCH_ASSOC))" 

or in here

$getResults = sqlsrv_query($connms, $tsql)

Here is an example of the data where it stops. "PAR, Lacdo 15.6 Inch 360° Prot" Seems that this is the offending character °

Any help in getting the whole record set to return would be most appreciated.

PHP 7.4.16
sqlsrv 5.9.0

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
RickV
  • 37
  • 3

1 Answers1

0

What did it was adding this to the connection options 'CharacterSet'=>'UTF-8'

$serverName = "192.168.x.x";
$connectionOptions = array(
    "Database" => "database",
    "Uid" => "username",
    "PWD" => "xxxxxxxxxxxxxxxxx",
    'CharacterSet'=>'UTF-8'
);
$connms = sqlsrv_connect($serverName, $connectionOptions);
RickV
  • 37
  • 3