Hey there,
I´m trying to create a PDO informix query, and I just can´t get it right.
My code (two tests) below.
I´d really appreciate some help here!
Thanks alot!
[php]Test #1
<?php
try {
$conn = new PDO("informix:DSN=XX; Database=XX; Protocol=XX; Host=XX; Service=XX; ", "USR", "PW");
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$data = $conn->query("CALL informix.sp_call_csq_agent ('2013-11-28 00:00:00', '2013-11-30 00:00:00', 0, NULL, '0036106683,0022671006', NULL, NULL, NULL, NULL, NULL, NULL, -1, -1 )");
foreach($data as $row) {
print_r($row);
}
} catch(PDOException $e) {
echo 'ERROR: ' . $e->getMessage();
}
?>
Test #2
<?php
$conn = new PDO("informix:DSN=XX; Database=XX; Protocol=XX; Host=XX; Service=XX; ", "USR", "PW");
$query = $conn->prepare("CALL informix.sp_call_csq_agent ('2013-11-28 00:00:00', '2013-11-30 00:00:00', 0, NULL, '0036106683,0022671006', NULL, NULL, NULL, NULL, NULL, NULL, -1, -1 )");
$query->execute();
foreach($query->fetch(PDO::FETCH_ASSOC) as $row) {
echo $row["node_id"];
echo " ";
echo $row["session_id"];
}
?>[/php]
How it looks like now:

How I want it to look like: (table style)
