Skip to content

[FEATURE] add whereNotIn function#156

Merged
mbabker merged 2 commits into2.0-devfrom
unknown repository
May 29, 2019
Merged

[FEATURE] add whereNotIn function#156
mbabker merged 2 commits into2.0-devfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented May 7, 2019

Summary of Changes

Add function whereNotIn.

So now we can use prepared statements for NOT IN queries easier.

Testing Instructions

using something like this:

$groups = array("Editor", "Author");
$db = Factory::getDbo();
$query = $db->getQuery(true)
                                ->select($db->quoteName('title'))
                                ->from($db->quoteName('#__usergroups'))
                                ->whereNotIn($db->quoteName('title'), $currentGroups, ParameterType::STRING);$db->setQuery($query);

$result = $db->loadColumn()

$result should contain alls groups, except of Editor and Author

@HLeithner
Copy link
Copy Markdown
Contributor

@mbabker I would like to see this merged, as long as we don't have a better solution for such functions.

  • extendWhere and it's short cuts have the same problem...

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