Login   Register  
PHP Classes
elePHPant
Icontem

File: delete.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Ghali Ahmed  >  sqlExec  >  delete.php  >  Download  
File: delete.php
Role: Example script
Content type: text/plain
Description: Simple test how to delete a record
Class: sqlExec
Compose and execute common types of MySQL queries
Author: By
Last change: Change description
Date: 2008-02-01 09:40
Size: 395 bytes
 

Contents

Class file image Download
<?php 
//inclusion du fichier de configuration
include("db.conf.php") ;
//inclusion du fichier de la classe
include("sqlExec.class.php") ;
//instantiation de la classe
$db = new sqlExec() ;
//Définir la table
$db->setTable("utilisateurs") ;
//l'identifiant de la ligne Ã  supprimer
$db->setWhere(" identifiant = 1 ") ;
//suppression
$update $db->delete() ;

echo 
$update ;

?>