Date: 10/18/00
- Next message: Michael Chaney: "[phplib] Spruce Tree class & demo"
- Previous message: yannick: "[phplib] Problem with LDAP auth"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi. I have php4 + oracle 8.1.6 + oci8 and I have a problem with num_rows
and nf();
The solution is
You should duplicate your WHERE clause of the query in such environments
and
ask for the COUNT(*). This will be less inefficient as it seems as the
query
path and query result have been cached by the database.
So in your case....
$db=new DB_Sql();
$query="select count(*) from MyTable";
$db->query($query);
$db->next_record();
if($db->f(0)) {
$query="select * from MyTable";
$db->query($query);
while($db->next_record() {
.......
}
}
but if the select count(*) returns the value '0', I receipt the value
"object" not '0'.
Have anybody help me?
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: Michael Chaney: "[phplib] Spruce Tree class & demo"
- Previous message: yannick: "[phplib] Problem with LDAP auth"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

