Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

loop through ResultSet

Status
Not open for further replies.

jj0914

Programmer
Aug 4, 2006
33
CA
I am trying to convert ctime to ymd format in my resultset, since I have 15 entries from my "email" table, i need to loop through all 15 entries, I am not sure how I can loop through it, can anyone help me on this:

my $start = DateTime->now->subtract( days => 15 );
my $end = DateTime->now;

my $searchresult = $c->model( 'Update::Email' )->search( {
-and => [
ctime => { '>=', $start->epoch }, ctime=>{ '<=', $end->epoch }
]
});

Thank you
 
What is in $c that you're using to get your search result?
 
$c->model( 'Update::Email' ) is the Email table in my Database, ctime is just a column in the Email table
 
Yes but you're calling a method called "model" on a variable named $c but I don't know what kind of object $c actually is.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top