浏览代码

Test du connecteur dans l'index.php

Brendan Abolivier 10 年前
父节点
当前提交
02a4443615
共有 2 个文件被更改,包括 21 次插入2 次删除
  1. 4
    0
      web/classes.php
  2. 17
    2
      web/index.php

+ 4
- 0
web/classes.php 查看文件

@@ -0,0 +1,4 @@
1
+<?php
2
+
3
+require_once('class.connector.php');
4
+require_once('class.questset.php');

+ 17
- 2
web/index.php 查看文件

@@ -1,5 +1,20 @@
1 1
 <?php
2
-	header("Content-Type:application/json");
3 2
 
4
-	echo json_encode(array("Message" => "Hello world;"));
3
+require_once('classes.php');
5 4
 
5
+//	header("Content-Type:application/json");
6
+
7
+//	echo json_encode(array("Message" => "Hello world;"));
8
+
9
+
10
+$bdd = new Connector();
11
+
12
+$options = array(
13
+	"where" => array(
14
+		array("login", "=", "Dragavnir"),
15
+	),
16
+	"order by" => array("score", "desc"),
17
+	"limit" => array(0, 10) // Ou array(10)
18
+);
19
+
20
+var_dump($bdd->Select("*", "scores", $options));