title: LIKE SQL with parameters throwing Invalid Parameter Number
body: <p>So I'm trying to use a "LIKE" in the SQL, basically to see if a player is in a team already. Here's the code I have:</p>
  
  <pre><code>    $checkifonlytwo = "SELECT * FROM sg_turn_teams WHERE joinid = :joinid AND players LIKE '%:ownerid,%'";
      $paramstwo = array(
          ":joinid" =&gt; $joinid,
          ":ownerid" =&gt; $_SESSION['user']['id']
      );
      try{
      $stmttwo = $db-&gt;prepare($checkifonlytwo);
      $resulttwo = $stmttwo-&gt;execute($paramstwo);
      }
      catch(PDOException $ex){
          die("Failed to run query #2: " . $ex-&gt;getMessage());
      }
  </code></pre>
  
  <p>Also as you can see I want it to be <code>LIKE '%1,%'</code> for example, so the comma at the end too.</p>
  
  <p>My table structure looks like this.
  <img src="https://i.imgur.com/Ou71LBa.png" alt="table structure"></p>
  
  <p>EDIT, the players is going to be like "1,2,3" without the names because the users are able to change their name. The picture is with names, but it's supposed to be 1,2,3</p>