pg_delete

基本介紹

  • 外文名:pg_delete
  • 功能:刪除記錄
  • 條件: assoc_array 中
  • 格式: field=>value 
pg_delete,說明,pg_delete() 例子,

pg_delete

(PHP 4 >= 4.3.0)
pg_delete -- 刪除記錄

說明

mixed pg_delete ( resource connection, string table_name, array assoc_array [, int options])
pg_delete() 刪除符合條件的記錄,條件在 assoc_array 中以 field=>value 格式給出。如果指定了 option,則 pg_convert() 按照該選項作用於 assoc_array 之上。

pg_delete() 例子

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

相關詞條

熱門詞條

聯絡我們