title: getting error - SQLSTATE[21000]: Cardinality violation: 1241 Operand should contain 1 column(s)
body: <p>I am getting this error
  SQLSTATE[21000]: Cardinality violation: 1241 Operand should contain 1 column(s)
  can someone help me understand why?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;?php
  
  
  session_start();
  $turk_number ='';
  $serial='';
  $version='';
  if(isset($_POST['turk_number']))
  {
      $_SESSION['turk_number'] = $_POST['turk_number'];
      $turk_number= $_POST['turk_number'];
  }
  
  $hostname = "localhost";
  $username = "root";
  $password = "";
  $dbname = "resolver";
  
  try 
  {
      $dbh = new PDO("mysql:host=$hostname;dbname=$dbname", $username, $password);
  
      $dbh-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  
      $query1 = "SELECT ((SELECT * FROM participants ORDER BY serial DESC LIMIT 0, 1) % 10) + 1 as version";
      //$results = $dbh-&gt;query($query1);
          $results = $dbh-&gt;prepare($query1);
          $results-&gt;execute();
          $serial = $results-&gt;fetchColumn(0);
      if($test= $results-&gt;fetchColumn(1))     
      {
          $version = $test;   //last version on record + 1
      }
      else //if no user ever played any games
      {
          $version = 1;
      }
      $query2 = "INSERT INTO participants (version) VALUES (:version, :turk_number)";
          $stmt = $dbh -&gt;prepare($query2);
          $stmt -&gt;execute(array(':version' =&gt; $version,
                              ':turk_number' =&gt; $turk_number));
  
  }
  catch(PDOException $e)
  {
      echo $e-&gt;getMessage();
  }   
  
  $_SESSION['serial']= $serial;
  $_SESSION['version']=$version;
  
  
  ?&gt;
  serial &lt;?php print $serial; ?&gt;&lt;br /&gt;
  version &lt;?php print $version; ?&gt;&lt;br /&gt;
  turk &lt;?php print $turk_number; ?&gt;
  </code></pre>