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

SQL like does not work with parameters #11

Open
GusBeare opened this issue Sep 29, 2015 · 2 comments
Open

SQL like does not work with parameters #11

GusBeare opened this issue Sep 29, 2015 · 2 comments

Comments

@GusBeare
Copy link

I believe I have noticed a bug and it's a significant one.

In your readme you have this:

context.All("SELECT * FROM Cars WHERE Name LIKE %@0%", "Lotus");

But this causes an object ref error because there are no single quotes around the expression.
But, when I try this:

var ads = context.All("select * from myTable where Title like '%@0%'","Vis");

The parameter is ignored.

Don't supposed you can fix this?

@GusBeare
Copy link
Author

I found a workaround so this might be by design and not a bug:

var ads = context.All("select * from Mytable where Title like @0","%Vis%");

Perhaps you could update the readme?

@19WAS85
Copy link
Owner

19WAS85 commented Oct 1, 2015

Hi @GusBeare, thanks for share this issue. I will fix the README.

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