summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Gass2020-09-03 15:10:08 +0200
committerNathan Gass2020-09-03 15:10:08 +0200
commit0a1feb7c54e7167b0479fe116e0062017d9496b8 (patch)
tree360b83858239311ae85b611d64d2b9a06353559a
parent75bbc82ca87fde88e5b9a8c902554a70831eb224 (diff)
downloaditools-0a1feb7c54e7167b0479fe116e0062017d9496b8.tar.gz
itools-0a1feb7c54e7167b0479fe116e0062017d9496b8.tar.bz2
itools-0a1feb7c54e7167b0479fe116e0062017d9496b8.zip
fix indentation
-rw-r--r--it_dbi.class6
-rw-r--r--it_dbi_postgres.class6
2 files changed, 6 insertions, 6 deletions
diff --git a/it_dbi.class b/it_dbi.class
index f59d779..ee6ce08 100644
--- a/it_dbi.class
+++ b/it_dbi.class
@@ -919,8 +919,8 @@ function escape_string($str)
*/
function escape_name($str)
{
- $this->_connect();
- return $this->_escape_name($str);
+ $this->_connect();
+ return $this->_escape_name($str);
}
/**
@@ -1113,7 +1113,7 @@ function _query($query, $p)
$this->_connect(array('reconnect' => true));
$result = mysqli_query($this->_link, $query, $p['unbuffered'] ? MYSQLI_USE_RESULT : MYSQLI_STORE_RESULT);
}
- }
+ }
$this->_affectedrows = $this->_link->affected_rows; # get_warnings() clobbers this
$this->_insertid = mysqli_insert_id($this->_link); # get_warnings() clobbers this
diff --git a/it_dbi_postgres.class b/it_dbi_postgres.class
index 8fc29f1..2f8eadb 100644
--- a/it_dbi_postgres.class
+++ b/it_dbi_postgres.class
@@ -62,7 +62,7 @@ function _get_field_defs()
$res = $this->query('SELECT * FROM information_schema.columns AS t ' . $where);
while ($res && ($field = $this->_fetch_assoc($res))) {
$result[$field['column_name']] = ['Field' => $field['column_name'], 'Type' => $field['data_type'], 'Extra' => it::match('^nextval\(', $field['column_default']) ? 'auto_increment' : '', 'Key' => $keys[$field['column_name']]];
- }
+ }
return $result;
}
@@ -96,7 +96,7 @@ function _query($query, $p)
if ($this->_p['keyfield'] && it::match('^INSERT ', $query)) {
$isinsert = true;
$query .= ' RETURNING ' . $this->_escape_name($this->_p['keyfield']);
- }
+ }
if (!($result = pg_query($this->_link, $query)) && $p['safety'])
{
/* TODO
@@ -111,7 +111,7 @@ function _query($query, $p)
$result = mysqli_query($this->_link, $query, $p['unbuffered'] ? MYSQLI_USE_RESULT : MYSQLI_STORE_RESULT);
}
*/
- }
+ }
$this->_affectedrows = pg_affected_rows($result);
$this->_insertid = $isinsert ? $this->_fetch_assoc($result)[$this->_p['keyfield']] : 0;