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

SQL IN operator #7

Closed
milantrax opened this issue Jul 16, 2015 · 1 comment
Closed

SQL IN operator #7

milantrax opened this issue Jul 16, 2015 · 1 comment

Comments

@milantrax
Copy link

Is it possible something like this, with IN operator:
SELECT * FROM Customers WHERE City IN ('Paris','London');
Thanks

@noncent
Copy link
Owner

noncent commented Jul 18, 2015

Hi Milantrax,

Yes, you can use IN like below sample code with pdoQuery:

/**
 *  Query with IN operator 
 */
$q = $db->pdoQuery('SELECT * FROM Customers WHERE City IN (?, ?);',array('Paris','London'))->showQuery()->results();
// print array result
$helper->PA($q); 

Sorry for any mistake's actually I am out for my weekend, so its just quick reply by my cell phone.

Cheers!!!

@noncent noncent closed this as completed Mar 22, 2016
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