|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-03-13 22:38 UTC] jasper at album dot co dot nz
[2006-03-14 14:07 UTC] kfbombar at us dot ibm dot com
[2006-03-27 17:48 UTC] kfbombar at us dot ibm dot com
[2006-04-09 01:35 UTC] wez@php.net
[2006-04-12 13:00 UTC] iani at us dot ibm dot com
[2006-06-14 12:25 UTC] iani at us dot ibm dot com
[2006-09-19 14:46 UTC] iani at us dot ibm dot com
[2007-01-24 17:43 UTC] iani at us dot ibm dot com
[2007-10-15 13:05 UTC] webmaster at smwebdesigns dot com
[2008-05-07 12:13 UTC] iani at us dot ibm dot com
[2008-09-12 10:58 UTC] johannes at schlueters dot de
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 21 21:00:01 2025 UTC |
Description: ------------ If you use a database name with the table name you get an error in the driver. It does not matter if this name is remote, local or the current database. I have seen this in different drivers including pdo_odbc and pdo_informix. They all behave the same way. Reproduce code: --------------- <?php $conn = new PDO('odbc:SAMPLE', 'uname', 'pass'); $conn->exec('CREATE TABLE test (id INT)'); $conn->exec('INSERT INTO test(id) VALUES (1)'); $sql = "SELECT id FROM SAMPLE:test"; $stmt = $conn->query($sql); $num = $stmt->fetch( PDO::FETCH_BOTH ); print "Counted $num rows after $action: $num[0].\n"; ?> Expected result: ---------------- Counted Array rows after : 1. Actual result: -------------- Fatal error: Call to a member function fetch() on a non-object in ~/b.php on line 9