GithubHelp home page GithubHelp logo

Problems with WhereClause about pdo HOT 2 CLOSED

faapz avatar faapz commented on May 19, 2024 1
Problems with WhereClause

from pdo.

Comments (2)

ha17 avatar ha17 commented on May 19, 2024 1

Another problem is that >= ? part -- like it is looking for a variable to replace in there, instead of a comparison.

In the "value" part of the where() method, can we check to see if it is not a variable and if not, just use as, is? You can't do this, either:

->where('columnA', '<>', 'columnB')

It treats columnB like a value, eg:

SELECT * FROM table WHERE columnA <> ? 

instead of

SELECT * FROM table WHERE columnA <> columnB

If not in a ->where(), maybe a new method ->whereCompareCol() or something?

If Maintainer @FaaPz doesn't see any caveats, I'll do it and a PR.

from pdo.

kwhat avatar kwhat commented on May 19, 2024

I believe this was fixed a while ago in a different bug report. Is this still using the latest 2.x branch? There is now a RAW clause for doing things that shouldn't be escaped.

from pdo.

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.