Skip to content

Commit

Permalink
add direct sql
Browse files Browse the repository at this point in the history
  • Loading branch information
mipxtx committed Oct 26, 2018
1 parent 82ef869 commit 879a330
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/RedmineApi/Sql/MysqlClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,17 @@ private function performQuery($sql) {
return $result;
}

public function get($sql){
$result = $this->performQuery($sql);
if ($result instanceof \mysqli_result) {
return $result->fetch_all(MYSQLI_ASSOC);
}
}

public function escape($arg){
return $this->getConnect()->real_escape_string($arg);
}

private function log($sql) {
if ($this->logQueries) {
error_log($sql);
Expand Down

0 comments on commit 879a330

Please sign in to comment.