|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* Fallback for database startup errors |
|
5
|
|
|
* |
|
6
|
|
|
* PHP Version 5 |
|
7
|
|
|
* |
|
8
|
|
|
* @category Core |
|
9
|
|
|
* @package Database |
|
10
|
|
|
* @author Hans-Joachim Piepereit <[email protected]> |
|
11
|
|
|
* @copyright 2013 cSphere Team |
|
12
|
|
|
* @license http://opensource.org/licenses/bsd-license Simplified BSD License |
|
13
|
|
|
* @link http://www.csphere.eu |
|
14
|
|
|
**/ |
|
15
|
|
|
|
|
16
|
|
|
namespace csphere\core\database; |
|
17
|
|
|
|
|
18
|
|
|
/** |
|
19
|
|
|
* Fallback for database startup errors |
|
20
|
|
|
* |
|
21
|
|
|
* @category Core |
|
22
|
|
|
* @package Database |
|
23
|
|
|
* @author Hans-Joachim Piepereit <[email protected]> |
|
24
|
|
|
* @copyright 2013 cSphere Team |
|
25
|
|
|
* @license http://opensource.org/licenses/bsd-license Simplified BSD License |
|
26
|
|
|
* @link http://www.csphere.eu |
|
27
|
|
|
**/ |
|
28
|
|
|
|
|
29
|
|
|
class Driver_None extends Base |
|
30
|
|
|
{ |
|
31
|
|
|
/** |
|
32
|
|
|
* Handle database driver specific transactions |
|
33
|
|
|
* |
|
34
|
|
|
* @param string $command One of these strings: begin, commit, rollback |
|
35
|
|
|
* |
|
36
|
|
|
* @return boolean |
|
37
|
|
|
**/ |
|
|
|
|
|
|
38
|
|
|
|
|
39
|
|
|
public function transaction($command) |
|
40
|
|
|
{ |
|
41
|
|
|
unset($command); |
|
42
|
|
|
|
|
43
|
|
|
return false; |
|
44
|
|
|
} |
|
45
|
|
|
|
|
46
|
|
|
/** |
|
47
|
|
|
* Sends a command to the database and gets the affected rows |
|
48
|
|
|
* |
|
49
|
|
|
* @param string $prepare Prepared query string with placeholders |
|
50
|
|
|
* @param array $assoc Array with columns and values |
|
51
|
|
|
* @param boolean $replace If more than {pre} needs to be replaced |
|
52
|
|
|
* @param boolean $insertid Return the last insert id instead of a rowcount |
|
53
|
|
|
* @param boolean $log Defaults to true which enables log files if used |
|
54
|
|
|
* |
|
55
|
|
|
* @return integer |
|
56
|
|
|
**/ |
|
|
|
|
|
|
57
|
|
|
|
|
58
|
|
|
public function exec( |
|
59
|
|
|
$prepare, array $assoc, $replace = false, $insertid = false, $log = true |
|
60
|
|
|
) { |
|
61
|
|
|
unset($prepare, $assoc, $replace, $insertid, $log); |
|
62
|
|
|
|
|
63
|
|
|
return 0; |
|
64
|
|
|
} |
|
65
|
|
|
|
|
66
|
|
|
/** |
|
67
|
|
|
* Sends a query to the database and fetches the result |
|
68
|
|
|
* |
|
69
|
|
|
* @param string $prepare Prepared query string with placeholders |
|
70
|
|
|
* @param array $assoc Array with columns and values |
|
71
|
|
|
* @param integer $first Number of the first dataset to show |
|
72
|
|
|
* @param integer $max Number of datasets to show from first on |
|
73
|
|
|
* |
|
74
|
|
|
* @return array |
|
75
|
|
|
**/ |
|
|
|
|
|
|
76
|
|
|
|
|
77
|
|
|
public function query($prepare, array $assoc, $first = 0, $max = 1) |
|
78
|
|
|
{ |
|
79
|
|
|
unset($prepare, $assoc, $first, $max); |
|
80
|
|
|
|
|
81
|
|
|
return []; |
|
82
|
|
|
} |
|
83
|
|
|
} |
|
84
|
|
|
|