Re: pg_query

From: Date: Thu, 26 Feb 2004 04:26:36 +0000
Subject: Re: pg_query
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-178903@lists.php.net to get a copy of this message
>I have a small question about sending PostgreSQL commands/statements. I >noticed that there's a function pg_insert that can insert rows, but I >have also seen codes that use pg_query(pg_exec, actually) to do the same >job(in phpBB). Since 'query' is defined to 'retrieve' data, is it more >preferred to use pg_insert when inserting rows? Maybe more generally, do >I just send whatever through pg_query, or it's more adequate/efficient to >use specific functions. Thank you. pg_insert() is more limited than pg_query(), in terms of the input it will accept. I imagine it exists to provide a convenient shorthand for the sort of wrapper functions that everyone writes at one time or another. --------------------------------------------------------------------- michal migurski- contact info and pgp key: sf/ca http://mike.teczno.com/contact.html

« previous php.general (#178903) next »