문제 해결 PHP MySQL의 쿼리 : 내 PHP 스크립트를 통해내가이 쿼리를 실행하려고
$q1 = "INSERT INTO `Validation` (`Key`, `Status`, `Notes`, `Serial`) VALUES (max(Key)+1, 'Valid', '".mysql_real_escape_string($user)."', '0')";
,하지만 때마다 그것은이 오류가 표시
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 'Key)+1, 'Valid', 'USER', '0')' at line 1
어떤 아이디어?
자동으로 증가하는 ID를 시뮬레이션하려고합니까? 이 경우 열에 AUTO_INCREMENT를 사용하면됩니다. – robbrit