-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.php
33 lines (28 loc) · 1.7 KB
/
test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* Created by PhpStorm.
* User: eduardo
* Date: 29/11/15
* Time: 11:02
*/
require_once 'classes/Connection.php';
$c = Connection::get();
/*************************************************************************************************
* IMPORTANT $task, $arguments[], $conditions[] or null ++++++++++++++++++++++++++++++++++++++++++
************************************************************************************************/
/**FORMATS TO Insert
* $c->insert("user", ["name"=>'ONE', "surname"=>'ONE', "password"=>'test', "email"=>'test@test.es'], null);
* $c->insert("category", ["name"=>'test'], null);
* $c->insert("event", ["user"=>'1001',"category"=>'5',"name"=>'Un evento asociado a un usuario',"address"=>'Una direccion pa quedar',"city"=>'100', "description"=>'Barbacoa en mi casa este finde...', "dateStart"=>'2015-01-02 12:12:12', "dateEnd"=>'2015-10-10 12:12:12', "img"=>'100.jpg', "public"=>'1', "offer"=>'cerveza gratis!'], null);
*/
/**FORMATS TO Update
* $c->update("user",["name"=>'change',"surname"=>'change',"password"=>'change',"email"=>'change@change.es'],["id"=>'5000']);
* $c->update("category",["name"=>'Informatica'],["id"=>'5']);
* $c->update("event", ["user"=>'5',"category"=>'5',"name"=>'Un evento asociado a un usuario',"address"=>'Una direccion pa quedar',"city"=>'100', "description"=>'Barbacoa en mi casa este finde...', "dateStart"=>'2015-01-02 12:12:12', "dateEnd"=>'2015-10-10 12:12:12', "img"=>'100.jpg', "public"=>'1', "offer"=>'cerveza gratis!'], ["id"=>'1504']);
*/
/**FORMATS TO Delete
*$c->delete("user", ["id"=>'1498'], null);
*$c->delete("category", ["id"=>'1498'], null);
*$c->delete("event", ["id"=>'1498'], null);
*/
$c->delete("event", ["id"=>'1498'], null);