PHP Classes

File: update.php

Recommend this page to a friend!
  Classes of Ghali Ahmed  >  sqlExec  >  update.php  >  Download  
File: update.php
Role: Example script
Content type: text/plain
Description: How to esaly execute an update query
Class: sqlExec
Compose and execute common types of MySQL queries
Author: By
Last change: Change description
Date: 8 years ago
Size: 652 bytes


Class file image Download
//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") ;

$columnValue = array("nom" ,"yamen2","text",
"passwd" ,md5("your_password55"),"text",
"actif","1","int") ;

//Définir les colonne inserer ainsi que leurs valeurs et leurs type
$db->addColumnValue($columnValue) ;
$db->setWhere(" identifiant = 1 ") ;
$update = $db->update() ;

$update ;