Why doesn't it matter?



  • $token = $_GET["token"];
    $stmt = $pdo->prepare("SELECT token FROM Tokens WHERE token =? LIMIT 1");
    $stmt->execute(array($token));
    echo $stmt->fetchColumn(PDO::FETCH_ASSOC);
    

    The answer is empty.

    What's the problem?



  • $token = $_GET["token"];
    $stmt = $pdo->prepare("SELECT token FROM Tokens WHERE token =? LIMIT 1");
    $stmt->execute(array($token));
    
    if($stmt->rowCount() == 1) {
        echo $stmt->fetchColumn(0);
    }
    



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2