FRC: pg_metadata, pg_convert, pg_insert, etc
| From: | Yasuo Ohgaki | Date: | Wed, 10 Apr 2002 07:43:21 +0000 |
| Subject: | FRC: pg_metadata, pg_convert, pg_insert, etc | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-82447@lists.php.net to get a copy of this message | ||
Hi to all database module maintainers,
I've committed some new PostgreSQL functions and
manual pages for these.
pg_metadata() - get medata data
pg_convert() - check and convert array accoding to metadata
pg_insert()/update()/select()/delete() - does insert, etc by
array.
With the new function, users can do safely.
<?php
$db = pg_connect();
pg_insert($db, 'get_value_log', $_GET) or user_sent_malformed_data();
?>
Since, pg_insert() lookup metadata and convert array values
safely used in SQL.
Please take a look at API, since you or other person may
implement same feature for your database in the future.
And API should be consistent whenever it's possible.
I can change API if it's before PHP 4.3.0.
Thank you.
--
Yasuo Ohgaki