diff --git a/myql/myql.py b/myql/myql.py
index <HASH>..<HASH> 100755
--- a/myql/myql.py
+++ b/myql/myql.py
@@ -109,9 +109,10 @@ class YQL(object):
         args is a list of ['column', 'operator', 'value']
         '''
         if cond[1].lower() == 'in':
-            #if len(cond[2]) > 1:
-            if not isinstance(cond[2], str):
+            if not isinstance(cond[2], str) and 'select' not in cond[2][0].lower() :
                 cond[2] = "({0})".format(','.join(map(str,["'{0}'".format(e) for e in cond[2]])))
+            elif not isinstance(cond[2], str) and 'select' in cond[2][0].lower() :
+                cond[2] = "({0})".format(','.join(map(str,["{0}".format(e) for e in cond[2]])))
             else:
                 cond[2] = "({0})".format(','.join(map(str,["{0}".format(e) for e in cond[2]])))
fix #<I>: special treatment for IN cond with SELECT statement in it