Date: 08/07/01
- Next message: wqzxw <email protected>: "[PHP-DEV] Bug #12621: is always ORA-12699 Native service internal error"
- Previous message: robert.marchand <email protected>: "[PHP-DEV] Bug #7280 Updated: global iniline not supported in SGI Compiler"
- Next in thread: Stig Sæther Bakken: "Re: [PHP-DEV] Re: [PEAR-DEV] DB : affectedRows() on an UPDATE query ?"
- Reply: Stig Sæther Bakken: "Re: [PHP-DEV] Re: [PEAR-DEV] DB : affectedRows() on an UPDATE query ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello,
"Tomas V.V.Cox" wrote:
> > > > It would be great to allow an affectedRows() (returning a DB_Result instead
> > > > of a DB_OK) with UPDATE or DELETE queries !
> > >
> > > affectedRows() works only with UPDATES/INSERT/DELETE queries.
> > >
> > > $db->query('delete * from users');
> > > echo "I have deleted " . $db->affectedRows() . " users";
> > >
> > > > It works with mysql but I dont know if it is possible with others db so that
> > > > it could be done
> > >
> > > It's implemented in all backends.
> >
> > Ermm... Interbase API does not seem to provide a way for determine the
> > number of affected rows,
>
> Someone sent time ago a patch for supporting affected row in Ibase:
> http://www.geocrawler.com/lists/3/Web/5/75/4454246/
> http://www.phpbuilder.com/mail/php-db/2000101/0275.php
>
> So my though is that probably is supported by the API but not yet by
> PHP.
Ok, but it is fair to say that it is not supported in all PEAR-DB
backends even if it is just a limitation of PHP Interbase API.
Maybe sometime later somebody adds a ibase_affected_rows() function, but
PHP scripts can't assume that the function exists because the PHP
version that is installed may not have such function yet.
I suggest that somebody apply that patch and PHP scripts that use
function_exists() function to figure if PHP Interbase API can figure the
number of affected rows.
Manuel Lemos
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: wqzxw <email protected>: "[PHP-DEV] Bug #12621: is always ORA-12699 Native service internal error"
- Previous message: robert.marchand <email protected>: "[PHP-DEV] Bug #7280 Updated: global iniline not supported in SGI Compiler"
- Next in thread: Stig Sæther Bakken: "Re: [PHP-DEV] Re: [PEAR-DEV] DB : affectedRows() on an UPDATE query ?"
- Reply: Stig Sæther Bakken: "Re: [PHP-DEV] Re: [PEAR-DEV] DB : affectedRows() on an UPDATE query ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

