Giter Site home page Giter Site logo

Comments (5)

alexgann avatar alexgann commented on July 17, 2024

Just a curiosity, what happens if you include the wildcards in your parameter instead of writing them into the query?

where('name like ?', '%Ferrar%');

from orientdb-odm.

Ashyam90 avatar Ashyam90 commented on July 17, 2024

Right now I can't test and it's been a while since I noticed this, but I
believe it translates into the following SQL:

WHERE name like %Ferrar%

Without the quotes surrounding the expression. Likewise said, I can't test
right now, and will only be able to next week, but I believe it it as I
just stated. I can be wrong, of course; I'll test properly as soon as I'm
able to :)
On Aug 21, 2014 1:49 AM, "alexgann" [email protected] wrote:

Just a curiosity, what happens if you include the wildcards in your
parameter instead of writing them into the query?

'''
where('name like ?', '%Ferrar%');


Reply to this email directly or view it on GitHub
#178 (comment)
.

from orientdb-odm.

odino avatar odino commented on July 17, 2024

I see that we might not have tests covering the case (

$this->query->where('any() traverse ( any() like "%danger%" )', null, false);
this is everything I could find about LIKEs)

would you be able to provide a test case so that its easier for us to reproduce / fix?

cheers!

from orientdb-odm.

alexgann avatar alexgann commented on July 17, 2024

I just tested where('name like ?', '%Ferrar%'); and it returns as it should:
SELECT FROM Car WHERE name like "%Ferrar%"

This is common Doctrine and PDO behavior. See the following: http://stackoverflow.com/questions/3755718/doctrine2-dql-use-setparameter-with-wildcard-when-doing-a-like-comparison

Hope that helps!

from orientdb-odm.

odino avatar odino commented on July 17, 2024

Thanks man!
On Aug 21, 2014 6:22 PM, "alexgann" [email protected] wrote:

I just tested where('name like ?', '%Ferrar%'); and it returns as it
should:
SELECT FROM Car WHERE name like "%Ferrar%"

This is common Doctrine and PDO behavior. See the following:
http://stackoverflow.com/questions/3755718/doctrine2-dql-use-setparameter-with-wildcard-when-doing-a-like-comparison

Hope that helps!


Reply to this email directly or view it on GitHub
#178 (comment)
.

from orientdb-odm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.