From 62df56955bf98523c761eb9311b39c21d0c010a0 Mon Sep 17 00:00:00 2001 From: Andrew Chamamme Date: Tue, 26 Jun 2018 17:24:46 +0000 Subject: [PATCH] Update index.php --- index.php | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/index.php b/index.php index c9d39cf..372f860 100644 --- a/index.php +++ b/index.php @@ -1,13 +1,20 @@ table("users") -// ->select(["name"]) -// ->where(["name = 'test'"]) -// ->get(2,4); -$result = $tablet->table("users") - ->update(["name"=>"Test"]) - ->where(["name = 'hello'"]) - ->go(); - -var_dump ($result); +require "vendor/autoload.php"; + +use Orcons\Layers\Tablet; + +$config = require "config.php"; + +$db = new Tablet($config); + +#select query +$db->table('users') + ->select(['name','gender','age']) + ->get() + +#update statement +$db->table('users') + ->update(['name'=>'Chamamme']) + ->where(["id = 5","gender ='male'"]) + ->go() +