ID: 36032
Updated by: [EMAIL PROTECTED]
Reported By: stloukal at tiscali dot cz
-Status: Open
+Status: Bogus
Bug Type: PDO related
Operating System: Linux (FC4; 2.6.11)
PHP Version: 5.1.2
New Comment:
fetchSingle() was renamed to fetchColumn() 8 months ago.
Previous Comments:
------------------------------------------------------------------------
[2006-01-16 15:36:09] stloukal at tiscali dot cz
Description:
------------
Hello,
I get unexpectable error:
Fatal error: Call to undefined method PDOStatement::fetchSingle() in
...
I compiled PHP 5.1.2 from source with these configure commands:
'./configure' '--prefix=/usr/local'
'--with-apxs2=/usr/local/apache2/bin/apxs'
'--with-mysqli=/usr/local/mysql/bin/mysql_config'
'--with-mysql-sock=/tmp/mysql.sock' '--with-zlib' '--with-zlib-dir'
'--with-bz2' '--with-gd' '--enable-gd' '--enable-gd-native-ttf'
'--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' '--with-ttf'
'--with-freetype-dir=/usr/local' '--with-iconv=/usr/local'
'--with-curl=/usr/local' '--enable-track-vars' '--with-gettext'
'--with-config-file-path=/usr/local/apache2/conf' '--enable-trans-id'
'--enable-ftp' '--with-cpdflib=/usr/local' '--enable-mbstring'
'--with-openssl=/usr/local' '--without-pdo-sqlite' '--without-sqlite'
'--with-pdo-mysql=/usr/local/mysql/' '--with-iodbc=/usr/local/'
I have no troubles with any other PDO functions.
Reproduce code:
---------------
<?PHP
try{
$pom = new PDO('mysql:host=localhost;dbname=mydb','user','pass');
$tmp_res = $pom->query('SELECT * FROM u_users');
if($tmp_res)
echo $tmp_res->fetchSingle();
}
catch(PDOException $e){
echo $e->getMessage();
}
unset($pom);
Expected result:
----------------
1
Actual result:
--------------
Above error message
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36032&edit=1