[php-maint] Bug#573478: Problem when using createTable() method
Giuseppe Sacco
giuseppe at eppesuigoccas.homedns.org
Thu Mar 11 18:13:46 UTC 2010
Package: php-mdb2-driver-pgsql
Version: 1.5.0b2-1
This is my first test using mdb2 so I might have done something stupid,
but it seems the createTable() method is missing from this mdb2 driver.
A simple code I used:
$dsn = "pgsql://giuseppe:nopasswd@localhost:5437/phpschool";
$table = "testtable";
require_once 'MDB2.php';
$mdb2 =& MDB2::connect($dsn);
if (PEAR::isError($mdb2))
die($mdb2->getMessage());
$definizione = array (
'id' => array ( 'type' => 'integer', 'unsigned' => 1, 'notnull' => 1, 'default' => 0 ),
'id_cliente' => array ( 'type' => 'integer', 'notnull' => 1 ),
'numero' => array ( 'type' => 'text', 'length' => 64 ),
'data' => array ( 'type' => 'date' )
);
$mdb2->createTable($table, $definizione);
if (PEAR::isError($mdb2))
die($mdb2->getMessage());
And this is the error I get trying to call this script:
$ php db.php
PHP Fatal error: Call to undefined function:
MDB2_Driver_pgsql::createTable(). in /usr/share/php/MDB2.php on line
1993
The package I installed are:
$ COLUMNS=110 dpkg -l \*php\* | grep ^ii
ii libapache2-mod-php5 5.3.1-5 server-side, HTML-embedded scripting language (Apache 2 mo
ii php-mdb2 2.5.0b2-1 PHP PEAR module to provide a common API for supported RDBM
ii php-mdb2-driver-pgsql 1.5.0b2-1 PHP PEAR module to provide a PostgreSQL driver for MDB2
ii php-pear 5.3.1-5 PEAR - PHP Extension and Application Repository
ii php5 5.3.1-5 server-side, HTML-embedded scripting language (metapackage
ii php5-cli 5.3.1-5 command-line interpreter for the php5 scripting language
ii php5-common 5.3.1-5 Common files for packages built from the php5 source
ii php5-gd 5.3.1-5 GD module for php5
ii php5-imap 5.3.1-5 IMAP module for php5
ii php5-ldap 5.3.1-5 LDAP module for php5
ii php5-mcrypt 5.3.1-5 MCrypt module for php5
ii php5-pgsql 5.3.1-5 PostgreSQL module for php5
ii phpldapadmin 1.1.0.7-1.2 web based interface for administering LDAP servers
bye,
Giuseppe
More information about the pkg-php-maint
mailing list