Giter Club home page Giter Club logo

Comments (3)

cbornhoft avatar cbornhoft commented on June 21, 2024 2

Okay, I've figured out the source of the issue... it's odd to say the least.

Certain systems like MySQL allow nearly every character in the current charset to be included as part of table and field names (eg. the table \%&&,! is valid when wrapped in delimiters). Version 2 of fluent also tried to reflect that as best it could, so commas are now valid naming characters. See #209 for the exact changes.

With that in mind, the query in your example sees k.posX,k.posY as one single column because there's no space. Changing the above to

$this->_fpdo->from('key_competencies_post2019 k')
    ->orderBy('k.posX, k.posY');

removes the attempted join and the query is written as expected. So this isn't a bug in fluent per se, but I'll see what I can do so that it checks for commas when there is no explicit delimiter present in version 3.

TL;DR Make sure there are spaces between column references!

from fluentpdo.

cbornhoft avatar cbornhoft commented on June 21, 2024

Wow that's quite the version upgrade. At first glance, that query should still work as expected. There was great effort made to maintain full backwards compatibility in v2.

Let me look into this and see what I find!

from fluentpdo.

frtess avatar frtess commented on June 21, 2024

Lol it is indeed. I played with it a bit more and whatever I use as alias (just k, or AS k), it will not work. Only way to make it work is to remove the alias before posX ans posY. I know they are not needed in this particular case, but they have a TON of queries with joins that actually do need the aliases.

from fluentpdo.

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.