Re: Installing PEAR
| From: | messju mohr | Date: | Thu, 25 Jan 2001 14:56:24 +0000 |
| Subject: | Re: Installing PEAR | ||
| References: | 1 | Groups: | php.pear |
| Request: | Send a blank email to php-pear+get-1165@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
Your script was:
> <?php
> error_reporting(1023);
> include_once("settings.php");
> require_once( 'DB.php' );
> $db = DB::connect("mysql://$dbuser:$dbpass@$dbhost/$dbname" );
you do not check if your connection was successfull.
> $sql = 'SELECT * FROM demo';
> $demoResult = $db->query($sql);
if the connection was not successfull, the function query() is not
available here.
> while ($demoRow = $demoResult->fetchRow()) {
> echo $demoRow[2] . '<br>';
> }
> $db->disconnect();
> ?>
I am not a pear expert, so I can not say much more to you problem, sorry.
HTH anyway
messju
On Wed, 24 Jan 2001, Joao Prado Maia wrote:
>
> > No, I added the /usr/local/lib/php/ to the include_path and the script
> > doesn't work. Before adding this path to it, the error message was saying
> > that PHP couldn't find the DB.php file inside the include_path.
> >
> > Anyway, thats not the problem. Any PEAR experts might be kind enough to
> > reply to this one ?
> >
>
> Can someone please help me on this ? I already lost 2 hours yesterday
> night trying to understand where exactly is the problem...
>
> Joao
>
> --
> João Prado Maia <jpm@phpbrasil.com>
> http://phpbrasil.com - php com um jeitinho brasileiro
>
>
> --
> PHP Extension and Add-on Repository (PEAR) mailing list.
> Documentation can be found at http://pear.php.net/doc/pear.html
> To unsubscribe, e-mail: php-pear-unsubscribe@lists.php.net from the
> mail address you subscribed with.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: public key @ http://lammfellpuschen.de/public.key
iD8DBQE6cD6bubKPpFA4n0URAlG4AJ49pi5ndmyCpdNkv2jPQ8wpr/3+DQCfSMOG
eNGhxvcvaze2t3Ohu9SkdMI=
=MaIV
-----END PGP SIGNATURE-----