Revision 342
Added by stefan over 18 years ago
trunk/wb/framework/class.database.php | ||
---|---|---|
87 | 87 |
function query($statement) { |
88 | 88 |
$mysql = new mysql(); |
89 | 89 |
$mysql->query($statement); |
90 |
$this->set_error($mysql->error()); |
|
90 | 91 |
if($mysql->error()) { |
91 |
$this->set_error($mysql->error()); |
|
92 | 92 |
return null; |
93 | 93 |
} else { |
94 | 94 |
return $mysql; |
... | ... | |
99 | 99 |
function get_one($statement) { |
100 | 100 |
$fetch_row = mysql_fetch_row(mysql_query($statement)); |
101 | 101 |
$result = $fetch_row[0]; |
102 |
$this->set_error(mysql_error()); |
|
102 | 103 |
if(mysql_error()) { |
103 |
$this->set_error(mysql_error()); |
|
104 | 104 |
return null; |
105 | 105 |
} else { |
106 | 106 |
return $result; |
Also available in: Unified diff
Ticket #182 - error not reset by additional query