Im trying to check to see if value stored in $steamId is already in the table but its not working. What am i doing wrong.
Account_info table
+------------+---------+----------+-----+
| Steam_id | Partner | Token | RID |
+------------+---------+----------+-----+
| Steamid222 | Part222 | token222 | 1 |
+------------+---------+----------+-----+
$stmt = $conn->prepare("SELECT Steam_id from Account_info WHERE Steam_id = ':id'");
$stmt->bindParam(":id", '$steamId');
$stmt->execute();
if($stmt->rowCount() > 0)
{
//user exists
}
else
{
//user doesn't exist
}