Re: PEAR::db / oci8 trouble

From: Date: Mon, 27 May 2002 16:29:30 +0000
Subject: Re: PEAR::db / oci8 trouble
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-6480@lists.php.net to get a copy of this message
le 27/05/02 15:42, Roko Roic à roko@tis.hr a écrit : > Hi, > > I am trying to execute a query: > SELECT * FROM random_players WHERE status='A' AND rownum <=1 AND msisdn NOT > IN (SELECT msisdn FROM user_state) AND id NOT IN (24) > > I am using oracle 8 and PEAR::DB 1.2 > > While looking at my log file, I can see that PEAR::db tries to execute two > queries where there should be only one. I am guessing this is a workaround > for some compatibility issues, but it is stopping my application from working. > > Why is this first query being executed and how can I prevent that? > > May 27 15:16:00 [critical] DB Error: no such field ::debug:: SELECT > COUNT(*) FROM random_players WHERE status='A' AND rownum <=1 AND msisdn NOT > IN (SELECT msisdn FROM user_state) AND id NOT IN (24) > [nativecode=ORA-00904: invalid column name] > > May 27 15:16:00 [critical] DB Error: DB backend not capable ::debug:: > SELECT * FROM random_players WHERE status='A' AND rownum <=1 AND msisdn NOT > IN (SELECT msisdn FROM user_state) AND id NOT IN (24) You are probably using numRows() method which is only emulated in PEAR DB Oracle container. This is probably the cause of your 2 queries. You should do the numRows by using a self-made count query instead. Well, it is what I think but you didn't post any code so I can only guess. Bertrand Mansion Mamasam

« previous php.pear.dev (#6480) next »