I've been given an stored procedure that is called like this:
SP_REPORT_HOME 'param1','param2',1
It executes a bunch of code i'm not aware of, although it return a bunch of data I need to use. It contains some fields with null values, while others are fully filled (note that the entire row is not null, only some fields) Well I'm using PDO and PHP on an Ubuntu 10.10 machine to get that information, my getReport method is:
public function getReport($empresa1, $empresa2, $num) {
$ds = $this->connection->prepare('SP_REPORT_HOME ?,?,?');
$ds->bindParam(1, $empresa1, PDO::PARAM_STR, 4);
$ds->bindParam(2, $empresa2, PDO::PARAM_STR, 4);
$ds->bindParam(3, $num, PDO::PARAM_INT, 4);
$ds->execute();
return $ds->fetchAll();
}
The $this->connection is just a PDO instance created like this:
$this->connection = new PDO(
"dblib:host=IP:PORT;dbname=DBNAME",
"LOGIN",
"PASS"
);
The method returns the array containing the data without the rows that contain null fields, anyone know why it doesn't show these rows? I really need them. I'm using PHP5.3 and SQLServer 2008