Finale.php
1.22 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php
/**
* Created by PhpStorm.
* User: liuziyang
* Date: 13-12-20
* Time: 1:04
*/
class Q_Db_Adapter_Pdo_Finale
{
/**
* @var PDO
*/
private $_pdo;
/**
* @var PDOStatement
*/
private $_statement;
public function __construct(&$_pdo, &$_statement)
{
$this->_pdo = $_pdo;
$this->_statement = $_statement;
}
/**
* 返回插入ID
* @return integer
*/
public function lastInsertId()
{
return $this->_pdo->lastInsertId();
}
/**
* 返回执行sql的状态
* @return bool
*/
public function status()
{
return true;
}
/**
* 返回错误码
* @return String
*/
public function errorCode()
{
return $this->_pdo->errorCode();
}
/**
* 返回错误信息
* @return Array
*/
public function errorInfo()
{
return $this->_pdo->errorInfo();
}
/**
* 返回插入影响的行数
* @return integer
*/
public function rowCount()
{
return $this->_statement->rowCount();
}
/**
* @return bool
*/
public function nextRowset()
{
return $this->_statement->nextRowset();
}
}