PHP Classes

PHP JSON Flat File Database : Create database tables stored as files in JSON

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 58%Total: 556 All time: 5,476 This week: 40Up
Version License PHP version Categories
jsonql 0.12Free For Educatio...5.3PHP 5, Databases, Files and Folders
Description 

Author

This class can create database tables stored as files in JSON.

It can create a database column and add one or more columns of a given type to it.

The class can also add or delete rows from the table. When the changes are done, the database table can be saved to a given JSON file format.

Later the class can load the saved table from the JSON file.

Picture of Daniel Alan Guerrero Matamoros
  Performance   Level  
Name: Daniel Alan Guerrero ... <contact>
Classes: 7 packages by
Country: Mexico Mexico
Innovation award
Innovation award
Nominee: 1x

Example

<?php

require_once "jsonql.class.php";

$jql = new jsonql();
if(
$jql->createDB("sample")){
    echo
"Basic creating<BR/>";
   
$jql->addColumn("Name", "t");
   
$jql->addColumn("Lastname", "t");
   
$jql->addColumn("Age", "i");
   
$jql->addRow(array("Daniel", "Guerrero", 20));
   
$jql->addRow(array("Valeria", "Guerrero", 4));
   
$jql->addRow(array("Mia", "Efdent", 30));
   
$jql->printTable();
    echo
"<HR>";
    echo
"One row delete<BR/>";
   
$jql->deleteRow("Name", "Mia");
   
$jql->printTable();
    echo
"<HR>";
    echo
"All table delete";
   
$jql->deleteRow();
   
$jql->printTable();
} else {
    echo
"<BR/>Error!<BR/>";
}

?>


  Files folder image Files (2)  
File Role Description
Plain text file jsonql.php Class Base class
Accessible without login Plain text file sample.basic.php Example Basic Sample

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:556
This week:0
All time:5,476
This week:40Up
User Ratings User Comments (1)
 All time
Utility:100%StarStarStarStarStarStar
Consistency:87%StarStarStarStarStar
Documentation:-
Examples:-
Tests:-
Videos:-
Overall:58%StarStarStar
Rank:1397