My table is:
CREATE TABLE A(
id serial NOT NULL,
date timestamp without time zone,
type text,
sub_type text,
filename text,
filepath text,
filesize integer,
);
I have an update routine:
$Query = "UPDATE A SET type=\"" . $strType . "\" where id=" . intval($ID);
Problem:
When $strType is a string, like "lettuce" I get this error:
ERROR: column "lettuce" does not exist
When it is an int, no error.
Ideas?
more background:
- the insert code adds filename,filepath, both text types successfully