이 문에서 구문 오류는 어디에 있습니까? 나는 그것을 얻지 못한다. "? bind param method"를이 경우에 사용할 수 있습니까? 나는 PDO구문 error mysql
$stmt = $dbh->prepare("INSERT INTO epinfo WHERE TVShowTitle=? (Season, Episode, SDLink, HDLink, DlSDLink, DlHDLink) VALUES (?, ?, ?, ?, ?, ?)");
$stmt->bindParam(1, $_POST[tvshow]);
$stmt->bindParam(2, $_POST[season]);
$stmt->bindParam(3, $_POST[episode]);
$stmt->bindParam(4, $_POST[sdlink]);
$stmt->bindParam(5, $_POST[hdlink]);
$stmt->bindParam(6, $_POST[dlsdlink]);
$stmt->bindParam(7, $_POST[dlhdlink]);
$stmt->execute();
Error 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 'WHERE TVShowTitle='Breaking Bad' (Season, Episode, SDLink, HDLink, DlSDLink, DlH' at line 1
기존 레코드를 업데이트 하시겠습니까? –
where 절이 이해가되지 않습니다. 당신은 아마도 INSERT –
대신에 업데이트를 찾고 있습니다. 끝에 "where"절을 넣으십시오. 이렇게하기위한 MySQL 구문을 찾으십시오. – Daniel