You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Problem in "/system/Database/Query.php" -> function "compileBinds()" when a sql query has ":=" anywhere in "finalQueryString" and value to bind with "$hasNamedBinds".
I have a similar issue but on the left side of line 371. a simple query of "Select concat(date_format(MyTime,'%H:%i'), ' - ', concat(firstName,' ',lastName)) from table" triggers the "strpos($sql, ':') !== false" part of the assignment.
Maybe as an alternative, only search for binds after the where clause by using the optional offset parameter of strpos but using stripos for the where part as it's case insensitive?
Describe the bug
Problem in "/system/Database/Query.php" -> function "compileBinds()" when a sql query has ":=" anywhere in "finalQueryString" and value to bind with "$hasNamedBinds".
a simplified example :
AND any bind value in where
In "compileBinds()", "$hasNamedBinds" becomes false because of ":=", so no "matchNamedBinds" and the resulting query is :
instead of
Of course I could directly use a complete sql string in
but for my real complete query is complex, depending on many condition, and builder query is very useful in my case.
Why
is used in line "/system/Database/Query.php:371" ?
Or is there a another way not deleting this condition for $hasNamedBinds, and still use builder query ?
Thanks
CodeIgniter 4 version
4.0.4
Affected module(s)
/system/Database/Query.php function compileBinds()
Context
The text was updated successfully, but these errors were encountered: