Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM users WHERE 'login'='asdfasdf'' at line 1' in C:\WebServ\httpd\startuj\templates\include\reg.php:31 Stack trace: #0 C:\WebServ\httpd\startuj\templates\include\reg.php(31): PDOStatement->execute() #1 {main} thrown in C:\WebServ\httpd\startuj\templates\include\reg.php on line 31
dołączam fragment kodu, który wydaje się być za to odpowiedzialny...
$stmt = $db->prepare("SELECT FROM users WHERE 'login'=:login"); $stmt->bindValue(":login", $login, PDO::PARAM_STR); $stmt->execute(); //linia 31