cvs: pear /LiveUser/docs/examples demodata.php

From: Date: Thu, 09 Jun 2005 13:29:49 +0000
Subject: cvs: pear /LiveUser/docs/examples demodata.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-32442@lists.php.net to get a copy of this message
lsmith Thu Jun 9 09:29:49 2005 EDT Modified files: /pear/LiveUser/docs/examples demodata.php Log: - use MDB2_Schema::factory() http://cvs.php.net/diff.php/pear/LiveUser/docs/examples/demodata.php?r1=1.4&r2=1.5&ty=u Index: pear/LiveUser/docs/examples/demodata.php diff -u pear/LiveUser/docs/examples/demodata.php:1.4 pear/LiveUser/docs/examples/demodata.php:1.5 --- pear/LiveUser/docs/examples/demodata.php:1.4 Thu Jun 9 09:21:14 2005 +++ pear/LiveUser/docs/examples/demodata.php Thu Jun 9 09:29:49 2005 @@ -45,7 +45,7 @@ * @author Arnaud Limbourg <arnaud@limbourg.com> * @copyright 2002-2005 Markus Wolff * @license http://www.gnu.org/licenses/lgpl.txt - * @version CVS: $Id: demodata.php,v 1.4 2005/06/09 13:21:14 lsmith Exp $ + * @version CVS: $Id: demodata.php,v 1.5 2005/06/09 13:29:49 lsmith Exp $ * @link http://pear.php.net/LiveUser */ @@ -105,20 +105,13 @@ print "\n"; -$manager =& new MDB2_Schema; +$options = array('portability' => (MDB2_PORTABILITY_ALL ^ MDB2_PORTABILITY_EMPTY_TO_NULL)); +$manager =& MDB2_Schema::factory($dsn, $options); -$options = array( - 'debug' => true, - 'log_line_break' => '<br>', - 'portability' => (MDB2_PORTABILITY_ALL ^ MDB2_PORTABILITY_EMPTY_TO_NULL), -); - -$err = $manager->connect($dsn, $options); - -if (PEAR::isError($err)) { +if (PEAR::isError($manager)) { print "I could not connect to the database\n"; - print " " . $err->getMessage() . "\n"; - print " " . $err->getUserInfo() . "\n"; + print " " . $manager->getMessage() . "\n"; + print " " . $manager->getUserInfo() . "\n"; exit(); }

« previous php.pear.cvs (#32442) next »