Ver Mensaje Individual
  #43 (permalink)  
Antiguo 12/08/2014, 08:14
Avatar de adrirs11
adrirs11
 
Fecha de Ingreso: diciembre-2012
Ubicación: BCN
Mensajes: 107
Antigüedad: 11 años, 4 meses
Puntos: 1
Respuesta: php devuelve null en una request

Ahora probaré eso Djoaq.

Que os parece esto que he encontrado...parece que le pasaba lo mismo..

This what fixed it for me:

set ANSI_NULL_DFLT_ON ON

I had to query this first before calling any stored procedures

$result = mssql_query('set ANSI_NULL_DFLT_ON ON');
Hope that helps for anyone who had my problem. It was really frustrating, apparently you need this so PHP will return rows that have null columns in it and it has something to do with a compare inside the stored procedure. I believe it's when comparing something that might have a NULL value, PHP will ignore the entire row unless you pass this first.



¿Como debe quedar el código para probar lo que dice?