[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [FIX] ODBC: check for existing results in a more safe way that works with...
"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <693ffd127f05_2a17f7645701@gitlab-sidekiq-low-urgency-cpu-bound-v2-55c9b978c9-d8spx.mail> |
Victor Emanouilov pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki
Commits:
f396b39c by Victor Emanouilov at 2025-12-15T14:20:23+02:00
[FIX] ODBC: check for existing results in a more safe way that works with broader range of odbc drivers and backends
- - - - -
1 changed file:
- lib/core/Tracker/Tabular/ODBCManager.php
Changes:
=====================================
lib/core/Tracker/Tabular/ODBCManager.php
=====================================
@@ -120,7 +120,7 @@ class ODBCManager
$sql = "SELECT \"{$pk}\" FROM {$this->config['table']} WHERE \"{$pk}\" = ?";
$rs = odbc_prepare($conn, $sql);
odbc_execute($rs, [$id]);
- $exists = odbc_num_rows($rs) > 0;
+ $exists = odbc_fetch_array($rs) ? true : false;
} else {
$exists = false;
$id = null;
@@ -291,7 +291,7 @@ class ODBCManager
$rs = odbc_prepare($conn, $sql);
if ($rs) {
odbc_execute($rs, [$value]);
- $exists = odbc_num_rows($rs) > 0;
+ $exists = odbc_fetch_array($rs) ? true : false;
} else {
$exists = false;
}
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/f396b39c36f99f31f6a0ebaed345395c0e8ed5da
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/f396b39c36f99f31f6a0ebaed345395c0e8ed5da
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