[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [BP][FIX] ODBC get last auto-increment - make it database type indepdendent
"Baraka Kinywa \(@bkinywa24\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <68b80f5c27924_2cdd02c29766@gitlab-sidekiq-low-urgency-cpu-bound-v2-dc78c9688-kjw7b.mail> |
Baraka Kinywa pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki
Commits:
e0d9de6f by MAGENE Sem Joel at 2025-09-03T12:42:40+03:00
[BP][FIX] ODBC get last auto-increment - make it database type indepdendent
---
* [FIX] ODBC get last auto-increment - make it database type indepdendent
(cherry picked from commit 522ee938e3f0bf857232f6d6d1b4942885a21083)
See merge request tikiwiki/tiki!8485
- - - - -
1 changed file:
- lib/core/Tracker/Tabular/ODBCManager.php
Changes:
=====================================
lib/core/Tracker/Tabular/ODBCManager.php
=====================================
@@ -301,7 +301,7 @@ class ODBCManager
{
$this->handleErrors();
$conn = $this->getConnection();
- $sql = "SELECT MAX(CAST(\"$field\" AS INT)) as last from {$this->config['table']} WHERE ISNUMERIC(\"$field\") = 1";
+ $sql = "SELECT MAX(CAST(\"$field\" AS DECIMAL(20,0))) as last from {$this->config['table']} WHERE \"$field\" REGEXP '^[0-9]+$'";
$rs = odbc_prepare($conn, $sql);
if ($rs) {
odbc_execute($rs, []);
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/e0d9de6ffff2e98bc9b63426d79320b345d6fd0d
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/e0d9de6ffff2e98bc9b63426d79320b345d6fd0d
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs