Advertisement
Guest User

Untitled

a guest
Jul 11th, 2015
463
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. $sql = $DBH->prepare("INSERT INTO $students (name, secname, sex, group, email, mark, year, city) values (:name, :secname, :sex, :group, :email, :mark, :year, :city)");
  2. $sql->execute((array)$student);
  3.  
  4. //eror:
  5. 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 MariaDB server version for the right syntax to use near '(name, secname, sex, group, email, mark, year, city)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement