include ("../conexion/pod_connection.php"); $periodR=$_POST["periodR"]; $periodR = "JAN2018"; $t = 1; $n = ""; $sth = $pdo_object->prepare("exec [dbo].[OM_simplifiedReport] @type = ?, @orgUnitName = '', @country = ?, @period = ?, @employmentStatus = ? "); $sth->bindParam(1, $t, PDO::PARAM_INT); $sth->bindParam(2, $n, PDO::PARAM_STR ); $sth->bindParam(3, $n, PDO::PARAM_STR ); $sth->bindParam(4, $periodR, PDO::PARAM_STR ); $sth->bindParam(5, $n, PDO::PARAM_STR ); $sth->execute(); $result2 = $sth->fetchAll(PDO::FETCH_OBJ); echo json_encode($result2); do { $rows = $sth->fetchAll(PDO::FETCH_NUM); if ($rows) { echo "a : " . json_encode($rows) . "\r\n"; } } while ($sth->nextRowset());