Hi,<br> I may ask the same old question, but just could get it. So please help me to get it done. All I want is looping through the record set for example: if I want to loop through a column, I can use this:<br> <br> my @lname;<br> ########################<br> my $column = $c->model("myDB::Author")->get_column('last_name');<br> while(my $name = $column->next){<br> $lname[$i] = $name;<br> $i = $i + 1;<br> }<br> -----<br> but if I try:<br> my $recordset = [$c->model('myDB::Books')->search( authorid => "${authorid}" )];<br> while(my $name = $recordset->next){<br> $lname[$i] = $name->lname;<br>
$fname[$i] = $name->fname;<br> $i = $i + 1;<br> }<br> <br> I get error: <br> <pre wrap=""><code class="error">Can't call method "next" without a package or object reference<br><br>I know this is the error of declaration of the array and the method used to call, but did not see something similar in the docs.<br><br>Thank you<br></code></pre> <br> <p> 
        
<hr size=1>Looking for earth-friendly autos? <br> <a href="http://autos.yahoo.com/green_center/;_ylc=X3oDMTE4MGw4Z2hlBF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDZ3JlZW5jZW50ZXI-">Browse Top Cars by "Green Rating"</a> at Yahoo! Autos' Green Center.