PHP Classes

File: insert_example.php

Recommend this page to a friend!
  Classes of dan boorn   OO Mysql Wrapper   insert_example.php   Download  
File: insert_example.php
Role: Example script
Content type: text/plain
Description: Insert Example
Class: OO Mysql Wrapper
MySQL database SQL queries wrapper
Author: By
Last change:
Date: 18 years ago
Size: 584 bytes
 

Contents

Class file image Download
<?
   
##################################
    # Insert Row Example
    ##################################
   
   
require('mysql.php');
   
$mysql = new mysql();
   
   
//Create new sql obj
   
$node = new sqlNode();
   
   
$node->table = "members";
   
   
// push( Data Type, Column Name, Column Value )
   
$node->push("int","MemberID",1);
   
$node->push("text","FirstName","John");
   
$node->push("text","LastName","Doe");
   
$node->push("defined","CreationDate","NOW()");
   
   
// Execute query and store results
   
if(($results = $mysql->insert($node)) === false )
        die(
$mysql->debugPrint());
       
?>