title: SET a variable in SELECT statement - MySQL
body: <p>I'm using this code which has an error:</p>
  
  <pre><code>SET @rejects = '';
  
  SELECT *
  FROM list
  WHERE maker = 1
      AND by_ids IN ('10','11')
      AND country LIKE '%I%'
      AND (
          src IS NULL
          || src NOT IN (@rejects)
          AND checkSrc(src) = 'yes'
          AND SET @rejects = CONCAT(@rejects,',',src)
      );
  </code></pre>
  
  <p>What's causing the issue?</p>