Re: DBD::Pg problem - Mailing list pgsql-general

From Ausrack Webmaster
Subject Re: DBD::Pg problem
Date
Msg-id 000301c3b981$e9dfbda0$0100a8c0@jason
Whole thread Raw
In response to Re: DBD::Pg problem  (Alex Satrapa <alex@lintelsys.com.au>)
Responses Re: DBD::Pg problem
Re: DBD::Pg problem
List pgsql-general
Tried that ...it is definetely the to_email field, not any others that
is causing
the problem.

Jason


-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Alex Satrapa
Sent: Wednesday, December 03, 2003 6:31 PM
To: Ausrack Webmaster
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] DBD::Pg problem


Ausrack Webmaster wrote:
> The thing is...I am not. I am inserting it into a varchar field.

Are there any single quotes in the message body?  They will wreak havoc
with the rest of the query. And why are you putting single quotes around

'$parent'?

What happens if you move the '$body' to the end:

$sql="insert into it_contact (email, to_email,
subject,modify,parent,details) values(?,?,?,now(),$parent,'$body')";

Alex


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if
your
      joining column's datatypes do not match



pgsql-general by date:

Previous
From: Alvar Freude
Date:
Subject: Re: Cast text to bytea
Next
From: Richard Huxton
Date:
Subject: Re: DBD::Pg problem