quick fix equal-int comparison resulting in an error if search string is numeric but out of range of integer column

This commit is contained in:
Harald Bamberger
2025-07-21 16:14:16 +02:00
parent 4872792890
commit 7726850193
+7 -3
View File
@@ -1,12 +1,16 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/*
* TODO: 2025-07-21 ma0080 bare integer comparision results in db error
* if searchstring is numeric but out of range of int, think about
* more sophisticated solution using column data type - quick fix
* convert field and search string to text
*/
$config['equal-int'] = [
'priority' => 4,
'rank' => "0",
'compare' => "{field} = {word}",
'compare' => "{field}::text = {word}::text",
'force_integer' => true
];