PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

pg_end_copy> <pg_dbname
Last updated: Fri, 18 Jul 2008

view this page in

pg_delete

(PHP 4 >= 4.3.0, PHP 5)

pg_delete — Cancella le tuple.

Descrizione

mixed pg_delete ( resource $connessione , string $nometabella , array $arrayassoc [, int $opzioni ] )

pg_delete() cancella le tuple indicate dalle condizioni specificate da arrayassoc composto da campo=>valore. Se opzioni è specificato, pg_convert() viene applicata a arrayassoc con l'opzione data.

Example #1 pg_delete

<?php 
    $db 
pg_connect ('dbname=foo');
    
// Questo è sicuro, dal momento che $_POST è convertita automaticamente
    
$ris pg_delete($db'post_log'$_POST);
    if (
$ris) {
       echo 
"I dati inviati in POST sono stati cancellati: $ris\n";
    }
    else {
        echo 
"L'utente ha inviato dati sbagliati\n";
    }
?>

Nota: Questa funzione è sperimentale.

Vedere anche pg_convert()



add a note add a note User Contributed Notes
pg_delete
27-Apr-2004 03:47
One should take care when checking the return value.
0 == false which is not equal with failed delete.

if(!$res)
  echo "Nothing was deleted";

pg_end_copy> <pg_dbname
Last updated: Fri, 18 Jul 2008
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites