Re: [Phplib-users] num_rows in db_oracle.inc
Brought to you by:
nhruby,
richardarcher
From: Gerry P. <g.w...@ab...> - 2004-02-06 10:24:43
|
>it took me a while to figure out that my knowledge about SQL was not totally >nonsense, but the num_rows function seems to be not working properly. > >When I'm using this statement: > >SELECT ALL * FROM auth_group_md5 WHERE groupname like '%ll%' >(ALL is optional) > >and trying to receive the affected rows with > >$db->query($query) >echo $db->num_rows(); > >I'm always reveiving a "0". By using the SQL statement under sqlplus I'm >getting one result (which is the expected one). > >My question: >Is this a known problem? I've seen that there is a bug description, but I >don't think that it should be affected by my statement. >By the way: I'm using 7.4 of phplib. If I recall correctly this only works for some databases - I had a problem with Oracle but somebody else said mysql was ok. If you use Oracle then a possible solution is to use select count(*)... in a second query. Gerry |