我的表是:错误更新列
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,没有错误。
想法?
更多的背景:
- 插入代码添加文件名,文件路径,这两个文本类型的成功
感谢您的反馈意见。 – cbrulak 2009-02-04 07:45:48