Comments (2)
@Shnoulle CDbCriteria addSearchCondition only escapes the special characters mensioned here: https://dev.mysql.com/doc/refman/8.0/en/string-comparison-functions.html#operator_like
A workaround is to apply your own escape function and call CDbCriteria->compare()
with the last argument escape: false
(https://www.yiiframework.com/doc/api/1.1/CDbCriteria#compare-detail)
This will be hard to fix on the framework level in Yii 1, since there is no MSSQL specific override available here. Even then, fixing it in a backward compatible way will be hard since people might have applied workarounds even with $escape=true. I'm afraid this will stay a known issue.
from yii.
This will be hard to fix on the framework level in Yii 1, since there is no MSSQL specific override available here. Even then, fixing it in a backward compatible way will be hard since people might have applied workarounds even with $escape=true. I'm afraid this will stay a known issue.
Yes i try to extend CDbCriteria too but must update all new CDbCriteria
to new ownCDbCriteria
…
I hate MS ;)
from yii.
Related Issues (20)
- Limit and Offset not working correctly with MSSQL HOT 12
- strftime function is deprecated in php 8.1 and used in requirements/index.php getServerInfo HOT 1
- Use of undefined constant id / CGridView widget HOT 2
- Redis Cache - Deprecated: unserialize(): Passing null to parameter #1. HOT 7
- Fatal error: Uncaught CDbException: The table "tablename" for active record class "TablenameRecord" cannot be found in the database. HOT 3
- oci8 schema adapter returns null for 'KEY' field in column info which causes strpos deprecation error HOT 4
- CI tests failing HOT 1
- PHP 8.2 Compatibility HOT 1
- Argument 2 in number_format does not accept null HOT 1
- PHP 8.1 - setcookie(): Passing null to parameter #2 ($value) of type string is deprecated HOT 5
- CMssqlColumnSchema - error when default column value is SQL SERVER system functions HOT 1
- Error using UnionTypes in action declarations HOT 2
- Regression with MariaDB 10.5.1+ with old temporal types in CDbColumnSchema $dbType HOT 1
- Call to undefined method ReflectionUnionType::getName() in CConsoleCommand.php HOT 4
- PHAN checks HOT 10
- Deprecated dynamic properties in yii\framework\gii\components\Pear\Text\Diff\Engine\native.php . HOT 6
- CActiveRecord: __construct(): Passing null to parameter #1 ($flags) of type int is deprecated HOT 5
- Upgrading to version 1.1.17+ broke my routes. HOT 1
- PHP 8.3 Compatibility HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yii.