Informix / PHP - ifx_affected_rows
Posted in 2000
Topics: Versions, Editions & End-of-Life
Hi friends, I got a weird trobule when I try the function 'ifx_affected_rows' after both a ifx_prepare and ifx_query. I cannot receive the exact number of results? I got a '1' even if no records respect the sql statement I wrote. I have Informix IDS 9.20 and PHP 3.0.14 as a dynamic module with Apache 1.3.11 . Thanks a lot and Ciao -Gabriele
In article <gtucbsgupj92a96vcatmrjqa11ue1bkurp@4ax.com>, g.bartol@comune.prato.it says... > Hi friends, > > I got a weird trobule when I try the function 'ifx_affected_rows' > after both a ifx_prepare and ifx_query. > > I cannot receive the exact number of results? I got a '1' even if > no records respect the sql statement I wrote. > > I have Informix IDS 9.20 and PHP 3.0.14 as a dynamic module with > Apache 1.3.11 . > > Thanks a lot and Ciao > -Gabriele > > Ciao Gabriele First, do not post same question 3 times. Second, read manual. "For inserts, updates and deletes the number is the real number (sqlerrd[2]) of affected rows. For selects it is an estimate (sqlerrd[0]). Don't rely on it. " The problem is, what now? There is/was discussion of this on my site (www.falout.com) in Phorum, take a look. (Phorum-Ifmx discussion). The only reliable thing at the moment, untill I add ifx_num_rows() function equivalent to num_rows() in other databases implementations is to do a second query with "select count(*)" and the same where part. It is very unfortunate that other developers of PHP Informix interface do not agree about the need for this function, and I don't have much time at the moment. -- Yours, Andrej Falout, http://www.falout.com ICQ 7628616 ++64.21.607517 #----------------------------------------------------------------- globals "std_disclaimer.4gl" Ask yourself just one question: ' Qu' m's se puede hacer y aprender ? - Propellerhead ReBirth RB-338 manual