-
Notifications
You must be signed in to change notification settings - Fork 2
/
test.php
35 lines (34 loc) · 1.03 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
34
35
<?php
require_once ('./inc/dbConnect.php');
require_once ('./inc/db/profile.php');
require_once ('./inc/db/personal.php');
$dbProfile = new dbProfile();
$dbPersonal = new dbPersonal();
/**
* "Stat"
*/
$dbProfile->pf_getStats($tplData['dzielnice'], 'dzielnice');
var_export($tplData['dzielnice']);
/**
* Simple&in-exact test
*
$dbProfile->pf_getRecords($pv_array, array('dzielnica' => 'Wrzeszcz Dolny'));
var_export($pv_array);
$dbPersonal->pf_getRecords($pv_array, array('imie' => '%ac%'), array(), false);
var_export($pv_array);
/**
* Get/set test
*
var_export($pv_array[0]);
$id = $pv_array[0]['id'];
$prev = $pv_array[0]['plec'];
$pv_array[0]['plec'] = '123';
$dbProfile->pf_setRecords($pv_array[0], array('id' => $id));
$dbProfile->pf_getRecords($pv_array, array('id' => $id));
var_export($pv_array);
$pv_array['plec'] = $prev;
$dbProfile->pf_setRecords($pv_array, array('id' => $id));
$dbProfile->pf_getRecords($pv_array, array('id' => $id));
var_export($pv_array);
/**/
?>