Login   Register  
PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Arthur Tumanyan  >  Config Storage  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example file
Class: Config Storage
Store and retrieve key-value entries in SQLite
Author: By
Last change:
Date: 2012-02-18 06:43
Size: 1,033 bytes
 

Contents

Class file image Download
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>
        <?php
            
require_once 'ConfigStorage.php';
            
// create an instance of class
            // default database file name is 'storage.db'
           // $my = new ConfigStorage('your.db');
           
$my = new ConfigStorage();
            
// setting debug mode,enables debug messages
           
$my->SetDebug(true);
           
// setting field types
           
$my->CreateScheme('INTEGER','TEXT');
           
// adding an entry
           
$my->AddEntry(1'hello');
           
// get an entry
           
echo $my->GetEntry(1);
           
// get all entries
           
print_r($my->GetAllEntries());
           
// get count of all entries
           
echo $my->GetEntriesCount();
           
// delete an entry
           
$my->DeleteEntry(1);
           
// delete all entries
           
$my->DeleteAllEntries();


          

        
?>
    </body>
</html>