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

equal and like LINE 44 #23

Open
Midako opened this issue Jan 17, 2015 · 1 comment
Open

equal and like LINE 44 #23

Midako opened this issue Jan 17, 2015 · 1 comment

Comments

@Midako
Copy link

Midako commented Jan 17, 2015

  • LINE 44
    • sprintf('WHERE "%s" %s ?', $id, (ctype_digit($data) === true) ? '=' : 'LIKE'),

ctype_digit is checking if string = only digits
if true it get a equal otherwise a LIKE

  • situation
    • tbl_name, col_name and entry = 00001-Name

so i do a request for 00001

  • expected
    • SELECT * FROM tbl_name WHERE col_name LIKE '%00001%'
    • result: 1
  • get
    • SELECT * FROM tbl_name WHERE col_name = '00001'
    • result: 0
  • database type
    • mysql

perhaps you should change the /(#any)/(#any)/(#any) on #Line 39 to /(#any)/(#any)/(#operator)/(#any)

@drveresh
Copy link

@Midako Were you able to find a fix or solution? I am still looking for it, please help me out if you have got it.

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

No branches or pull requests

2 participants