_primary) > 0) { $stmt = $this->_db->query(sprintf('SELECT MAX(%s) FROM `%s` WHERE 1', $this->_primary, $this->getTable())); $result = $stmt->fetchColumn(); if (is_numeric($result)) { $id = (int) $result; } } return $id; } } // End ^ Native EOL ^ encoding