Re: [PHP-CVS] cvs: php4 /pear/Cache/Container db.php phplib.php
[email protected] (Jon Parise) Fri, 2 Mar 2001 10:33:46 -0500
| Newsgroups | php.pear |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Mar 02, 2001 at 02:16:38PM -0000, Ulf Wendel wrote:
> + /**
> + * Stores a dataset.
> + *
> + * WARNING: we use the SQL command REPLACE INTO this might be
> + * MySQL specific. As MySQL is very popular the method should
> + * work fine for 95% of you.
> + */
> function save($id, $data, $expires = 0)
> {
> $query = sprintf('REPLACE INTO %s (content, expires, id) VALUES (%s, %d, %s)',
It's nice that you've added this warning, but it still makes this code
MySQL-specific (it won't work with PostgreSQL and perhaps other
database).
Ref: http://www.postgresql.org/mhonarc/pgsql-general/1999-10/msg00045.html
--
Jon Parise ([email protected]) . Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/ : Computer Science House Member