Re: New PostgreSQL functions
| From: | Adam Voigt | Date: | Mon, 08 Apr 2002 12:46:31 +0000 |
| Subject: | Re: New PostgreSQL functions | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-18316@lists.php.net to get a copy of this message | ||
I'm just curious is the purpose of these functions to remove
the requirement that programmers know SQL? I'm not trying
to sound sarcastic or anything, but I mean, whats next
a pgsql_select_join for joins? If someones smart enough to figure
out the Postgres install and performance tuning (and I know my first
time was quite a rollercoaster of pain), why would you need
to try and simplify it's use when a all powerful, all knowing, all doing
pgsql_query would work? I'm mainly just wondering because
sometimes my windows counterparts (who write in ASP or iHTML)
think it's funny PHP has so many ways to do certain things, and so
few ways to do other things. =)
Just Curious,
Adam Voigt
adam.voigt@cryptocomm.com
On Mon, 08 Apr 2002 13:41:46 +0900, Yasuo Ohgaki <yasuo_ohgaki@yahoo.com> wrote:
> Hi,
>
> I've added new PostgreSQL functions to CVS.
>
> --------------------------------------------------------------------
> array pg_metadata(resource db, string table)
> Get metadata
>
> --------------------------------------------------------------------
> array pg_convert(resource db, string table, array values)
> Check and convert values for PostgreSQL SQL statement
> It escapes and add quotes around values accoding to
> metadata (i.e. Table Definition)
>
> --------------------------------------------------------------------
> bool pg_insert(resource db, string table, array values[, bool convert[,
> bool async]])
> Insert values (field=>value) to table
>
> --------------------------------------------------------------------
> bool pg_update(resource db, string table, array fields, array ids[, bool
> convert[, bool asy
> nc]])
> Update table using values (field=>value) and ids (id=>value)
>
> --------------------------------------------------------------------
> bool pg_delete(resource db, string table, array ids[, bool convert[,
> bool async]])
> Delete records has ids (id=>value)
>
> --------------------------------------------------------------------
> array pg_select(resource db, string table, array ids[, bool convert])
> Select records that has ids (id=>value)
>
> --------------------------------------------------------------------
>
> They will be available for PHP 4.3.0.
> Please refer to test files under ext/pgsql/tests/ for usage.
>
> If you use PHP 4.1.x or above, you can replace old PostgreSQL
> module by new one. There are many new functions that will be
> avaiable in PHP 4.2.0 also.
>
> Bug reports and comments are welcome.
> Enjoy.
>
> --
> Yasuo Ohgaki
> yohgaki@php.net
>
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>