Re: [phplib] why $db->nf() returns 0 all the time??? From: Alexander Aulbach (ssilk <email protected>)
Date: 09/07/00

On Thu, 7 Sep 2000, raysoft wrote:

}I am using phplib7.2c to visit Oracle db.
}I am using db_oci8.inc file.
}but when I do this:
}
} $db=new DB_Sql();
} $query="select * from MyTable";
} $db->query($query);
} if($db->nf()) //?????!!!!!
} {
} while($db->next_record()
} {
} .......
} }
} }
}
}The function $db->nf() alwarys return 0!! even if there is some records in MyTable.
}why?
}when I use this with MySql, It do thing OK.
}Is't Oracle's fault or Phplib's??

Oracle is not able to return the number of found rows in your result. So
this function is "reconstructed" inside of PHPLIB; this reconstruction is
not possible with every possible query. Think it's your fault. :)

Out of db/oracle/db_sql.inc:

  ## Known bugs: It will not work for SELECT DISTINCT and any
  ## other constructs which are depending on the resulting rows.
  ## So you *really need* to check every query you make, if it
  ## will work with it!
  ##
  ## Also, for a qualified replacement you need to parse the
  ## selection, cause this will fail: "SELECT id, from FROM ...").
  ## "from" is - as far as I know a keyword in Oracle, so it can
  ## only be used in this way. But you have been warned.

  function num_rows() {

-- 

SSilk - Alexander Aulbach - Herbipolis/Frankonia Minoris - (0931)22032

--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>