Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DB Like with Associative array error #2041

Closed
kutothe opened this issue Nov 29, 2012 · 1 comment
Closed

DB Like with Associative array error #2041

kutothe opened this issue Nov 29, 2012 · 1 comment

Comments

@kutothe
Copy link

kutothe commented Nov 29, 2012

I'm using MySQL, when trying to use the database "like" function and passing an associative array:

$this->db->like(array('first_name'=>'harry', 'last_name'=>'groover'));

It should produce:

SELECT `first_name`, `last_name`, `username` FROM `person` WHERE `first_name` LIKE '%harry%' AND `last_name` LIKE '%groover%'

Instead it produces:

SELECT `first_name`, `last_name`, `username` FROM `person` WHERE `first_name` LIKE '%harry%' ESCAPE '!' `last_name` LIKE '%groover%' ESCAPE '!'
@narfbg narfbg closed this as completed in 4173823 Nov 29, 2012
@kutothe
Copy link
Author

kutothe commented Nov 30, 2012

Worked great, thank you!

nonchip pushed a commit to nonchip/CodeIgniter that referenced this issue Jun 29, 2013
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

No branches or pull requests

2 participants