Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@p9s
Copy link

@p9s p9s commented Mar 14, 2024

No description provided.

Copy link
Collaborator

@treffynnon treffynnon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original looks correct to me

@p9s
Copy link
Author

p9s commented Mar 14, 2024

the seconds args: array('age' => '>'), will change all age column to use '>' operator

please try this simple demo here.

➜ demo cat index.php

where_any_is(array( array('name' => 'Joe', 'age' => 10), array('name' => 'Fred', 'age' => 20)), array('age' => '>')) ->find_many(); echo ORM::get_last_query() . "\r\n"; ?>

➜ demo php index.php
SELECT * FROM person WHERE (( name = 'Joe' AND age > '10' ) OR ( name = 'Fred' AND age > '20' ))

@treffynnon
Copy link
Collaborator

Yeah that's a different query. Note the extra array with '>' in it?

@p9s
Copy link
Author

p9s commented Mar 15, 2024

yes, the ORM final generate SQL is correct.
but, in doc write a wrong SQL example. see my pr

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

Successfully merging this pull request may close these issues.

2 participants