PHP Classes

File: Insert.php

Recommend this page to a friend!
  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: 9 years ago
Size: 608 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" ,"yamen","text",
"passwd" ,md5("your_password"),"text",
"actif","1","int") ;

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

$insert ;