Home » Database » DB » Bug #7258
MSSQL DONT WORKS: DB_FETCHMODE_OBJECT
Details
| Submitted | 2006-03-30 09:09 UTC |
|---|---|
| From | jmascarell at agc-net dot com |
| Status | Duplicate |
| Package | DB |
| PHP Version | 5.0.4 |
| OS | Linux Debian |
| Roadmaps | (Not assigned) |
Comments
[2006-03-30 09:09 UTC] jmascarell at agc-net dot com
Description:
------------
The script works with DB_FETCHMODE_DEFAULT, but don't works if changes to DB_FETCHMODE_OBJECT.
Test script:
---------------
$options = array(
'debug' => 2,
'portability' => DB_PORTABILITY_ALL,
);
$db =& DB::connect($dsn, $options);
if (PEAR::isError($db)) {
die($db->getMessage());
};
$sql="SELECT Codigo FROM Maquinas where Empresa='01' AND es_cliente='1' AND par_sit='01' AND final_fech > '2004-01-01'";
$result=$db->query($sql);
$row=$result->fetchRow(3);
$echo $row->Codigo
Expected result:
----------------
The expected result :
00145
Actual result:
--------------
The Actual Result:
(Don't print)