PHP code example of r0mdau / jisly

1. Go to this page and download the library: Download r0mdau/jisly library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

r0mdau / jisly example snippets


$database = new Jisly($directory);

$database->collection($name);

$successBool = $database->collection($file)->insert(
  [
    "name" => "Lucas",
    "firstname" => "Georges"
  ]
);

$successBool = $database->collection($file)->delete($rid);

$results = $database->collection($file)->find();

$results = $database->collection($file)->find(
  [
    "name" => "Lucas"
  ]
);

$result = $database->collection($file)->findOne(
  [
    "name" => 19
  ]
);

$result = $database->collection($file)->find(
  [
    "firstname" => "Georges",
    "name" => "Lucas"
  ], JislyCollection::LOGICAL_OR
);

$result = $database->collection($file)->findOne(
  [
    "firstname" => "Georges",
    "name" => "Lucas"
  ], JislyCollection::LOGICAL_AND
);

$successBool = $database->collection($file)->update(
  $rid,
  [
    "firstname" => "Georges",
    "name" => "Lucas"
  ]
);