On Mon, 23 Nov 1998, Ken Wills wrote:
>
> > print STDERR ${inputstr}, "\n";
>
> >To see what your 'insert into...' string looks like exactly? It looks
> >like you are missing a ' in there somewhere when you are generating yoru
> >string...
>
> I tried this, and can see whats causing the error. From apache's error log:
> --snip--
> \'
> \'
> \'
> none7
> [Mon Nov 23 09:54:31 1998] [error] DBD::Pg::db do failed: ERROR: Bad datetime external representation
> 'Mon Nov 23 09NULLNULL 1998'
>
> --snip--
> the time field is the last one to go in here. the insert string looks like:
> my $query_string=qq{INSERT INTO CALLS (ca_service_id, ca_org_name, ca_phone_number, ca_status,
> ca_product, ca_problem, ca_resolution, ca_contact_name, ca_assigned, ca_date) VALUES ('$service_id',
> '$org_name', '$phone_number', '$status', '$product', '$problem', '$resolution', '$contact',
> '$assigned', '$time_now')};
First, why not just put 'now' where '$time_now' is?
Second, what is the output in the Apache logs if you add:
print STDERR $query_string, "\n";
Right After the "my $query_string=" statement? You should get something
tha tlooks like:
INSERT INTO CALLS...
Marc G. Fournier
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org