title: PHP MySQL != /w List of values
body: <p>Is it possible to select data with a single query from a mysql table with a string of values? I have the following query and am trying to retrive results where the c.id_category is not equal to any of the values in the string.
  which would consist of something like "1,67,23,34,65"</p>
  
  <pre><code>   'SELECT DISTINCT c.*, 
            cl.*
       FROM `'._DB_PREFIX_.'category` c 
  LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` 
                                             AND `id_lang` = '.intval($params['cookie']-&gt;id_lang).')
  LEFT JOIN `'._DB_PREFIX_.'category_group` cg ON (cg.`id_category` = c.`id_category`)
      WHERE 1'.(intval($maxdepth) != 0 ? ' 
        AND `level_depth` &lt;= '.intval($maxdepth) : '').'
        AND (c.`active` = 1 OR c.`id_category`= 1)
        AND c.`id_category` != VAR_ARRAY
        AND cg.`id_group` '.(!$cookie-&gt;id_customer ?  '= 1' : 'IN (SELECT id_group 
                                                                     FROM '._DB_PREFIX_.'customer_group 
                                                                    WHERE id_customer = '.intval($cookie-&gt;id_customer).')').'
   ORDER BY `level_depth` ASC, cl.`name` ASC'
  </code></pre>