PHP Classes

File: test1.php

Recommend this page to a friend!
  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: 22 years ago
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();
  }
 
?>