Login   Register  
PHP Classes
elePHPant
Icontem

File: test1.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Ruthger  >  textDB  >  test1.php  >  Download  
File: test1.php
Role: Example script
Content type: text/plain
Description: Test file
Class: textDB
A database class using csv files
Author: By
Last change:
Date: 2002-06-27 18:04
Size: 545 bytes
 

Contents

Class file image Download
Insert a record...<br>
<?
  
include("textdb.php");
  
  
$test = New textDB("test.txt");
  
  
$record $test->first();
  while (
$record)
  {
    echo 
$record[id]." ".$record[label]." ".$record[text]."<br>";
    
$record $test->next();
  }

  
$record[id]    = 12;
  
$record[label] = "c54332";
  
$record[text]  = "If this works";

  
$test->insert($record);      

  
$record $test->first();
  while (
$record)
  {
    echo 
$record[id]." ".$record[label]." ".$record[text]."<br>";
    
$record $test->next();
  }
  
?>