title: PDO - bindParam not working
body: <p>I'm creating a PDO class to use on my projects, but since I'm new to it I'm not being able to bind parameters to a prepared sql statement, with not error whatsoever. Here's the function that is ment to do it :</p>
  
  <pre><code># ::bindParam
  public static function bind()
  {
      # get function arguments
      $args = func_get_args();
  
      # check for any arguments passed
      if (count($args) &lt; 1)
      {
          return false;
      }
  
      foreach ($args as $params)
      {
          # named variables for convenience
          $parameter = $params[0];
          $variable = $params[1];
          $data_type = isset($params[2]) ? $params[2] : PDO::PARAM_STR;
          $length = isset($params[3]) ? $params[3] : null;
  
          # bind param to query
          Database::$statement-&gt;bindParam($parameter, $variable, $data_type, $length) or die('error');
      }
  }
  </code></pre>
  
  <p>and a prepared sql statement :</p>
  
  <pre><code>SELECT * FROM `users` WHERE `email` = :email AND `password` = :password LIMIT 1
  </code></pre>
  
  <p>Can someone point me in the right direction? The query produces no errors at this point. Note that I am assuming the problem is here, although it might not, since I'm only using bindParam() and prepare().</p>
  
  <p><strong>edit</strong> - trigger code</p>
  
  <pre><code>    $email = $_POST['email'];
      $password = $_POST['password'];
  
      $password = hash('sha256', $password);
  
      $this-&gt;db-&gt;prepare('SELECT * FROM `users` WHERE `email` = :email AND `password` = :password LIMIT 1');
      $this-&gt;db-&gt;bind(
          array(':email', $email),
          array(':password', $password)
      );
      $status = $this-&gt;db-&gt;execute();
  
      if ($status)
      {
          $result = $this-&gt;db-&gt;fetch('assoc');
  
          $this-&gt;template-&gt;user = $result;
      }
      else
      {
          $this-&gt;template-&gt;user = false;
      }
  </code></pre>