PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB » Bug #3483

DB_FETCHMODE_ASSOC and CaseSensitiveField

Details

Submitted2005-02-15 15:37 UTC
Fromlota at klez dot it
Assigneddanielc
StatusBogus
PackageDB
PHP Version4.3.10
OSDebian GNU-Linux Sarge (ppc)
Roadmaps(Not assigned)

Comments

[2005-02-15 15:37 UTC] lota at klez dot it

Description:
------------
I called my fileds in MySQL database:

StyleName varchar(250)

usign this function:

$res->fetchInto($row,DB_FETCHMODE_ASSOC);

echo $row["StyleName"]; // NULL

echo $row["stylename"]; // All OK :-)

Reproduce code:
---------------
<?php

// Query
$query = "SELECT * FROM product";

// Query
$res =& $db->query("$query");

// Always check that result is not an error
if (DB::isError($res))
{
die($res->getMessage());
}

$res->fetchInto($row,DB_FETCHMODE_ASSOC);

echo $row["StyleName"];

?>

Expected result:
----------------
the value

Actual result:
--------------
NULL

[2005-02-15 16:07 UTC] lota at klez dot it

I had set up
portability' => DB_PORTABILITY_ALL

excuse me for this report :-P

Alessandro