PHP Classes

File: edit_example.php

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

Contents

Class file image Download
<?
   
##################################
    # Edit 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("text","FirstName","Jane");
   
$node->push("text","LastName","Doe");
   
   
$node->where = "where MemberID = 1";
   
// Execute query and store results
   
if(($results = $mysql->update($node)) === false )
        die(
$mysql->debugPrint());
       
?>