Login   Register  
PHP Classes
elePHPant
Icontem

File: Insert.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  >  Insert.php  >  Download  
File: Insert.php
Role: Example script
Content type: text/plain
Description: Simple test how to insert a record
Class: sqlExec
Compose and execute common types of MySQL queries
Author: By
Last change: Change description of file
Date: 2008-02-01 09:40
Size: 608 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" ,"yamen","text",
                     
"prenom","yamen","text",
                     
"login","Yoyo","text",
                     
"passwd" ,md5("your_password"),"text",
                     
"actif","1","int") ;

//Définir les colonne Ã  inserer ainsi que leurs valeurs et leurs type
$db->addColumnValue($columnValue) ;
//Insertion
$insert $db->insert() ;

echo 
$insert ;

?>