Re: Problem with has_many and searching

[prev] [thread] [next] [Date index for 2004/10/05]

From: John Day
Subject: Re: Problem with has_many and searching
Date: 17:26 on 05 Oct 2004
At 12:21 PM 10/5/2004, Perrin Harkins wrote:
>On Tue, 2004-10-05 at 18:06, John Day wrote:
> > What I want is an iterator pointing to all records in
> > InContact::cDBI::contact which have a matching
> > InContact::cDBI::contactdetail where the value of the recontact field is
> > the selected date - $tm. So I execute this code:
> >
> >      my $details = InContact::cDBI::contact->contact_detail(recontact 
> => $tm);
> >      print Dumper $details;
>
>Does it work without the additional recontact constraint?

Nope
$VAR1 = bless( {
   '_data' => [
     {
       'id' => '1'
     },
     {
       'id' => '2'
     },
     {
       'id' => '4'
     },
     {
       'id' => '5'
     },
     {
       'id' => '6'
     },
     {
       'id' => '7'
     }
   ],
   '_place' => 0,
   '_mapper' => [],
   '_class' => 'InContact::cDBI::contactdetail'
}, 'Class::DBI::Iterator' );

>   Is $tm being
>turned into the right type to search a date field?

Not sure I understand, but I have made my date fields all the same as the 
MySQL. I think if it were not getting the date correct it would not have 
only returned 2 records in the first attempt.

>   Do you have a column
>called contact_detail?

No.

..john


>- Perrin


(message missing)

Ima::DBI and connections at Apache startup
Brad Bowman 08:03 on 04 Oct 2004

Re: Ima::DBI and connections at Apache startup
Perrin Harkins 17:15 on 04 Oct 2004

Re: Ima::DBI and connections at Apache startup
Brad Bowman 01:15 on 05 Oct 2004

Re: Ima::DBI and connections at Apache startup
Brad Bowman 04:47 on 05 Oct 2004

Re: Ima::DBI and connections at Apache startup
Perrin Harkins 14:27 on 05 Oct 2004

Problem with has_many and searching
John Day 16:06 on 05 Oct 2004

Re: Ima::DBI and connections at Apache startup
Perrin Harkins 14:26 on 05 Oct 2004

Re: Ima::DBI and connections at Apache startup
Brad Bowman 05:01 on 06 Oct 2004

Re: Ima::DBI and connections at Apache startup
Perrin Harkins 15:23 on 06 Oct 2004

Re: Problem with has_many and searching
Perrin Harkins 16:21 on 05 Oct 2004

Re: Problem with has_many and searching
John Day 17:26 on 05 Oct 2004

Re: Ima::DBI and connections at Apache startup
Tony Bowden 17:31 on 06 Oct 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52