Problem 'setting' data.

[prev] [thread] [next] [Date index for 2005/03/09]

From: John Day
Subject: Problem 'setting' data.
Date: 23:00 on 09 Mar 2005
Hi!,

I am using Class::DBI to save emails sent from a contact management system. 
Here is the code:

     my $outbox = InContact::cDBI::outbox->create( {
                                                    contact_id => 
$self->{_cid},
                                                    to => $self->{_to},
                                                    #cc => $self->{_cc},
                                                    #bcc => $self->{_bcc},
                                                    response => $rv,
                                                    body => $outbox_body,
                                                   } );

The contact_id, response and body in this case are okay, but I get an error 
when I try to include the to.

To isolate I tried this:
     $outbox->set( to => $self->{_to} );
     $outbox->update();

and get the following:

Tk::Error: Can't update 5: DBD::mysql::st execute failed: You have an error 
in your SQL syntax; check the manual that corresponds to
  your MySQL server version for the right syntax to use near 'to = 'John 
Day <johnday@xxxxxxxxxxxx.xxx>'
WHERE  id='5'' at lin [for Statement "UPDATE outbox
SET    to = ?
WHERE  id=?
"] at C:/Perl/site/lib/DBIx/ContextualFetch.pm line 51.

The data is an email address in the form:

John Day <johnday@xxxxxxxxxxxx.xxx>

Which has been passed to Net::SMTP and used to send an email. Any clues?

John

(message missing)

many-to-many relationship and sorting
Hartmaier Alexander 15:48 on 08 Mar 2005

Re: many-to-many relationship and sorting
Perrin Harkins 16:08 on 08 Mar 2005

many-to-many relationship and sorting
Hartmaier Alexander 16:14 on 08 Mar 2005

Re: many-to-many relationship and sorting
Perrin Harkins 17:52 on 08 Mar 2005

Re: many-to-many relationship and sorting
Matt S Trout 20:25 on 08 Mar 2005

Re: many-to-many relationship and sorting
Jay Strauss 18:37 on 08 Mar 2005

many-to-many relationship and sorting
Hartmaier Alexander 09:31 on 09 Mar 2005

Re: many-to-many relationship and sorting
Tony Bowden 09:53 on 09 Mar 2005

Re: many-to-many relationship and sorting
Matt S Trout 15:29 on 12 Mar 2005

many-to-many relationship and sorting
Hartmaier Alexander 10:29 on 09 Mar 2005

Re: many-to-many relationship and sorting
Tony Bowden 10:55 on 09 Mar 2005

Re: many-to-many relationship and sorting
William Ross 11:14 on 09 Mar 2005

many-to-many relationship and sorting
Hartmaier Alexander 11:26 on 09 Mar 2005

Re: many-to-many relationship and sorting
William Ross 11:36 on 09 Mar 2005

many-to-many relationship and sorting
Hartmaier Alexander 12:24 on 09 Mar 2005

Re: many-to-many relationship and sorting
Tony Bowden 12:57 on 09 Mar 2005

Re: many-to-many relationship and sorting
Jay Strauss 14:15 on 09 Mar 2005

Re: many-to-many relationship and sorting
Tony Bowden 15:14 on 09 Mar 2005

Re: many-to-many relationship and sorting
Perrin Harkins 17:31 on 09 Mar 2005

Problem 'setting' data.
John Day 23:00 on 09 Mar 2005

Re: Problem 'setting' data.
Michael Peters 23:12 on 09 Mar 2005

Re: Problem 'setting' data.
Jason Galea 23:30 on 09 Mar 2005

Re: many-to-many relationship and sorting
Matt S Trout 15:31 on 12 Mar 2005

Generated at 08:54 on 14 Mar 2005 by mariachi v0.52