Login   Register  
PHP Classes
elePHPant
Icontem

File: update.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  >  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: 6 years ago
Size: 652 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") ;

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

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

echo 
$update ;

?>