mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
Merge pull request #3848 from VSEphpbb/ticket/14116
[ticket/14116] sql_affectedrows method has no arguments * VSEphpbb/ticket/14116: [ticket/14116] sql_affectedrows method has no arguments
This commit is contained in:
commit
ef3de412b7
2 changed files with 3 additions and 3 deletions
|
@ -100,9 +100,9 @@ class db_text
|
||||||
$sql = 'UPDATE ' . $this->table . "
|
$sql = 'UPDATE ' . $this->table . "
|
||||||
SET config_value = '" . $this->db->sql_escape($value) . "'
|
SET config_value = '" . $this->db->sql_escape($value) . "'
|
||||||
WHERE config_name = '" . $this->db->sql_escape($key) . "'";
|
WHERE config_name = '" . $this->db->sql_escape($key) . "'";
|
||||||
$result = $this->db->sql_query($sql);
|
$this->db->sql_query($sql);
|
||||||
|
|
||||||
if (!$this->db->sql_affectedrows($result))
|
if (!$this->db->sql_affectedrows())
|
||||||
{
|
{
|
||||||
$sql = 'INSERT INTO ' . $this->table . ' ' . $this->db->sql_build_array('INSERT', array(
|
$sql = 'INSERT INTO ' . $this->table . ' ' . $this->db->sql_build_array('INSERT', array(
|
||||||
'config_name' => (string) $key,
|
'config_name' => (string) $key,
|
||||||
|
|
|
@ -962,7 +962,7 @@ abstract class driver implements driver_interface
|
||||||
{
|
{
|
||||||
if (preg_match('/^(UPDATE|DELETE|REPLACE)/', $query))
|
if (preg_match('/^(UPDATE|DELETE|REPLACE)/', $query))
|
||||||
{
|
{
|
||||||
$this->sql_report .= 'Affected rows: <b>' . $this->sql_affectedrows($this->query_result) . '</b> | ';
|
$this->sql_report .= 'Affected rows: <b>' . $this->sql_affectedrows() . '</b> | ';
|
||||||
}
|
}
|
||||||
$this->sql_report .= 'Before: ' . sprintf('%.5f', $this->curtime - $starttime) . 's | After: ' . sprintf('%.5f', $endtime - $starttime) . 's | Elapsed: <b>' . sprintf('%.5f', $endtime - $this->curtime) . 's</b>';
|
$this->sql_report .= 'Before: ' . sprintf('%.5f', $this->curtime - $starttime) . 's | After: ' . sprintf('%.5f', $endtime - $starttime) . 's | Elapsed: <b>' . sprintf('%.5f', $endtime - $this->curtime) . 's</b>';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue