Warning: PDOStatement::execute() expects parameter 1 to be array, string
<p>I want to pull 32 values from the database, but not in 32 different transactions. I am getting this warning and I am not grasping what it has a problem with.</p>

<pre><code>$team = "SELECT teamname FROM teamnames WHERE";
for ($j = 1; $j &lt;= 32; ++$j) {
    teamid == "$j";
    if ($j != 1) {
        $team .= ",";
    }
    if ($j == 32) {
        $team .= "\")";
    }
}

$teamselect = $db-&gt;prepare($team);
$teamselect-&gt;execute($team);
for ($y = 1; $y &lt;= 32; ++$y) {    
    $_SESSION["team$y"] = $teamselect-&gt;fetchColumn();
}
</code></pre>
