Hi all,

I have been developing in PHP/Interbase for about 2 years, and have just
started a new PHP aplication.

I wanted to use PEAR's DB abstraction, but am running into (big) problems. I
am sure I am doing something really stupid, but let's try anyway

External .inc.php file containing the following:

  Function Connect_DB() {
    $db=DB::connect( "ibase://$dbuser:[EMAIL PROTECTED]/$dbname" );
    return $db;
  Function Disconnect_DB($db) {

I include this file, and then have the following code:

  $demoResult = $db->query($sql);
  if (DB::isError($demoResult)) {
    die ($demoResult->getMessage());
  $count = 0;
  if ($row = $demoResult->fetchRow()) {
    $count ++;
    echo "Line $count";
    echo $row[0] . $row[1]. "\n";

The database Seelct statement should return 2 populated rows (and does in
other app)
The problem is that this section is either totally ignored, or it returns
millions of lines with blank $row resurls (ie lines of "Line1\nLine2\n, etc)

Where am I going wrong?

Thanks in advance...

David R

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to