-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
43 lines (30 loc) · 964 Bytes
/
index.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
34
35
36
37
38
39
40
41
42
43
<?php
require_once ("src/mf/utils/ClassLoader.php");
$load = new mf\utils\ClassLoader('src');
$load->register();
use \query\Query as Query;
use \models\Article as Article;
use \models\Categorie as Categorie;
use \connection\ConnectionFactory as Connection;
$connection = new Connection();
$config=parse_ini_file('conf/config.ini');
$connection::makeConnection($config);
/*$query = new Query();
$req = $query::table('article')->where('nom', '=', 'velo')->delete();
var_dump($req);
$article = new \models\Categorie();
$article->nom="nul";
$article->descr="du vide";
$article->insert();
$article = new Article();
$article->nom = 'livrbgggte jdr';
$article->descr = "pathfinder edition gggcollector golden remasterised signed";
$article->tarif = 5979.99;
$article->id_categ = 1;
$article->insert();
$article = new article();
$article=$article::first(107);
$article->delete();*/
$a = Article::first(110) ;
$categorie = $a->categorie ;
var_dump($categorie);