Home » Database » DB » Bug #5926
portability for boolean data types
Details
| Request #5926 | portability for boolean data types |
|---|---|
| Submitted | 2005-11-10 17:44 UTC |
| From | thewulf at gmail dot com |
| Status | Bogus |
| Package | DB |
| PHP Version | 5.0.5 |
| OS | Linux RH9 EE |
| Roadmaps | (Not assigned) |
Comments
[2005-11-10 17:44 UTC] thewulf at gmail dot com
Description:
------------
POSTGRESQL: 8.0.3
PEAR DB: 1.7.6
BUG: http://pear.php.net/bugs/bug.php?id=4535
This also occurs in the DB package.
Test script:
---------------
//table field "isdeleted" is boolean
$sql = 'SELECT * FROM users WHERE id=?';
$data = 1;
$st = $db->prepare($sql);
$res = $db->execute($st, $data);
$row = $res->fetchRow();
foreach($row as $key => $value) {
$this->$key = $value;
}
Expected result:
----------------
$this->isdeleted = {true} or {false}
Actual result:
--------------
$this->isdeleted = 't' or 'f'
[2005-11-18 02:16 UTC] thewulf at gmail dot com
that doesn't mean it shouldn't!