Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Incorrect SQL generated when using and/or combinations and where_open/where_close
  • He Jelmer, I seem to miss you on IRC these days, so I'll try here. When you have a moment... I've got this ORM query:
    This is the internal structure generated: As you'll see in the query generated (, the last OR is moved to the beginning of the query, and joined with the other conditions using AND, causing this query not to return any results.
  • What I don't get about your query is why "and_where_open" and "and_where_close" are added twice, that's probably the reason why the last OR becomes an AND (you have both and_where_open and or_where, the first one wins). I'll try this myself later today.
  • Ok, thanks. I'm rather stuck with this at the moment... :)

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion