★ wanayoo — archive 1999 http://www.php.net/manual/kr/function.pg-insert.phpNouvelle recherche | Portail wanayoo
PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previouspg_hostpg_last_errornext
Last updated: Thu, 18 Jul 2002
view the printer friendly version or the printer friendly version with notes or change language to English | Brazilian Portuguese | Chinese | Czech | Dutch | Finnish | French | German | Hungarian | Italian | Japanese | Polish | Romanian | Russian | Slovak | Spanish | Swedish

pg_insert

(PHP 4 CVS only)

pg_insert --  Insert array into table.

Description

bool pg_insert ( resource connection, string table_name, array assoc_array [, int options])

pg_insert() inserts assoc_array which has field=>value into table specified as table_name. If options is specified, pg_convert() is applied to assoc_array with specified option.

예 1. pg_insert

<?php 
    $db = pg_connect ('dbname=foo');
    // This is safe, since $_POST is converted autotmatically
    $res = pg_insert($db, 'post_log', $_POST);
    if ($res) {
        echo "POST data is succesfully logged\n";
    }
    else {
        echo "User must have sent wrong inputs\n";
    }
?>

참고: This function is experimental.

See also pg_convert()

User Contributed Notes
pg_insert
add a note about notes
There are no user contributed notes for this page.
previouspg_hostpg_last_errornext
Last updated: Thu, 18 Jul 2002
show source | credits | stats | mirror sites
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: Web Hosting Talk
Last updated: Thu Oct 17 21:47:44 2002 EDT