내 테이블은 다음과 같습니다오류 업데이트 행
CREATE TABLE A(
id serial NOT NULL,
date timestamp without time zone,
type text,
sub_type text,
filename text,
filepath text,
filesize integer,
);
내가 업데이트 루틴이 있습니다
$Query = "UPDATE A SET type=\"" . $strType . "\" where id=" . intval($ID);
문제 :
$ strType이 문자열 "상추"와 같은 경우를 이 오류가 발생합니다 :
ERROR: column "lettuce" does not exist
int이며 오류가 없습니다.
아이디어가 있으십니까?
더 배경 :
- 삽입 코드는 파일 이름, 파일 경로, SQL에서 성공적으로
의견에 감사드립니다. – cbrulak