1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/13803] Added get_max_id() tests

PHPBB3-13803
This commit is contained in:
JoshyPHP
2015-05-09 19:06:48 +02:00
parent ae6ad754a4
commit 7a8ac4bb71
2 changed files with 7 additions and 1 deletions

View File

@@ -51,7 +51,7 @@ abstract class row_based_plugin extends base
{
$columns = $this->get_columns();
$sql = 'SELECT MAX(' . $columns['id'] . ' AS max_id FROM ' . $this->get_table_name();
$sql = 'SELECT MAX(' . $columns['id'] . ') AS max_id FROM ' . $this->get_table_name();
$result = $this->db->sql_query($sql);
$max_id = (int) $this->db->sql_fetchfield('max_id');
$this->db->sql_freeresult($result);