PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Mihajlo Siljanoski  >  PHP JSON File Database  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP JSON File Database
Create and manipulate databases using JSON files
Author: By
Last change: Example file
Date: 3 years ago
Size: 1,126 bytes



Class file image Download

//Example of use

require_once 'lib/filedb.php';

$db=new filedb('testdatabase');

//if you like to drop database and all tables

//if you like to drop user table

//if you like to create user table

//if you like to add record in user table if table user doesn't exist automaticaly will be created

//to update record in user table
'surname'=>'Siljanoski updated','web'=>false,'address'=>'Test address'],//address will be added and web will be deleted
['_id'=>1,'name%'=>'mihajlo'] // where ID =1 AND name LIKE '%mihajlo%'

//to delete record with _id=5

//fetch records from database something like SELECT * FROM users WHERE name='Mihajlo' AND surname LIKE '%ski%'