Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

search module #11

Closed
cansozeri opened this issue May 12, 2014 · 1 comment
Closed

search module #11

cansozeri opened this issue May 12, 2014 · 1 comment
Labels

Comments

@cansozeri
Copy link
Contributor

Hi,

I have sarch the database with your form type and your function addCondition adds additional slashes into the mysql code as shown below, so no result founds.

SELECT COUNT(*) FROM user WHERE username LIKE '%%cansozeri%%'

The mysql query has to be like this

SELECT COUNT(*) FROM user WHERE username LIKE '%cansozeri%'

I think this is the code that can be change ..

$value = '%' . strtr($value, ['%'=>'%', '_'=>'_', ''=>'\']) . '%';

@robregonm robregonm added the bug label May 13, 2014
robregonm added a commit that referenced this issue May 13, 2014
@robregonm
Copy link
Owner

Fixed. Thanks for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants