Warning: include(../lntop.php) [function.include]: failed to open stream: No such file or directory in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/pg-insert.html on line 19

Warning: include() [function.include]: Failed opening '../lntop.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/pg-insert.html on line 19

Warning: include(../levoe_menu.php) [function.include]: failed to open stream: No such file or directory in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/pg-insert.html on line 46

Warning: include() [function.include]: Failed opening '../levoe_menu.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/pg-insert.html on line 46



Учебник РНР
НазадВперёд

pg_insert

(только PHP 4 CVS)

pg_insert - вставляет массив в таблицу.

Описание

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

pg_insert() вставляет assoc_array, имеющий field=>value, в таблицу table_name. Если options специфицирован, pg_convert() применяется к assoc_array со специфицированной опцией.

Пример 1. pg_insert
<?php 
    $db = pg_connect ('dbname=foo');
    // Это безопасно, так как $_POST конвертируется автоматически
    $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";
    }
?>

Примечание: эта функция является экспериментальной.

См. также pg_convert().


Назад Оглавление Вперёд
pg_host Вверхpg_last_error


Warning: include(../pravoe_menu.php) [function.include]: failed to open stream: No such file or directory in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/pg-insert.html on line 150

Warning: include() [function.include]: Failed opening '../pravoe_menu.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/pg-insert.html on line 150

Rambler's Top100
© 2009 Тест скорости интернета |  Boont.Ru

Warning: include(../lnbottom.php) [function.include]: failed to open stream: No such file or directory in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/pg-insert.html on line 276

Warning: include() [function.include]: Failed opening '../lnbottom.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/pg-insert.html on line 276