Date: 07/11/00
- Next message: Douglas Bridges: "Re: [phplib] Apache module question"
- Previous message: mArk.cOLListER: "[phplib] tpl_form"
- Next in thread: Björn Schotte: "Re: [phplib] database abstraction"
- Reply: Björn Schotte: "Re: [phplib] database abstraction"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sat, 1 Jul 2000, Björn Schotte wrote:
}Another good point is: _never_ use num_rows(). Within Oracle,
}that method in db_oci8.inc doesn't work properly. So if you
}would write:
Thats't true, but for db_oracle.inc I have written a "hack", which
rewrites the former query as shown below. This works for most more or less
"normal" queries, has only problems with GROUPed queries or other special
stuff.
As a web-application programmer you are sometimes dependent on a
numrows()-function, how would you otherwise show the user, how many pages
the found result has?
}$db->query("select foo from bar");
}print "We have ".$db->num_rows()." rows";
}
}You _should_ write:
}
}$db->query("select count(*) as numrows from bar");
}$db->next_record();
}$numrows = $db->f("numrows");
}
}$db->query("select foo from bar");
}print "We have $numrows rows";
}while ($db->next_record())
}> Don't think that I'm advocating Oracle over MySQL. I'm just saying that
}> there are so many differences that you really are getting into something a
}> lot more complex than you would first think.
}
}Yes. Furthermore, the database abstraction layer from PHPLIB
}doesn't seem to be very consistent and portable. We
}had to fiddle around a lot with db_oci8.inc until it
}worked nearly as we expected to work.
Yea, me too with db_oracle.inc. :-)
--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>
- Next message: Douglas Bridges: "Re: [phplib] Apache module question"
- Previous message: mArk.cOLListER: "[phplib] tpl_form"
- Next in thread: Björn Schotte: "Re: [phplib] database abstraction"
- Reply: Björn Schotte: "Re: [phplib] database abstraction"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

