On Sunday, Nov 9, 2003, at 09:24 US/Pacific, lanzaroto wrote:
Le dim 09/11/2003 à 17:44, drieux a écrit :

On Sunday, Nov 9, 2003, at 08:08 US/Pacific, lanzaroto wrote:


while({$id, $nom, $prenom, $email} = $STH->fetchrow_array){


                                       $REQ->Tr,
                                       $REQ->td('$id'),
                                       $REQ->td('$nom'),
                                       $REQ->td('$prenom'),
                                       $REQ->td('$email'),
                                       $REQ->$id++;
}
                                       ),

is this the 'while' at or near line 90?

yes

is there a reason that you have them in the form


'$var'

vice say

$var

eg:

$REQ->td($id),

since the single tick will prevent 'expansion' and hence pass
a literal string there?

There is also the odd bit that you doing an interative loop
in the middle of a print statement. Hence I would split that up
into three print statements

        stuff before the while loop,
        the while loop printing
        stuff after the while loop.

attached below find some play code, and IF you can help me
with how i would be able to do a

print "some stuff here", while(...){....}, "some other stuff";

then you clearly will have coolness.

ciao
drieux

---

        my $req = Foobar::foobar();
        
        $req->fill_foobar(junk_me());
        
        while ( my ( $id, $thing, $third, $forth) = $req->fetch())
        {
                print "$id, $thing, $third, $forth \n";
                #"\t$id, $thing, $third, $forth \n";
        
        };
        
        
        sub junk_me {
                 [
                        [qw/a b c d/],
                        [qw/e f g h/],
                        [qw/i j k l/],
                        [qw/bob ted carol alice/]
                ];
        }
        
        package Foobar;
        
        #------------------------
        #
        sub foobar {
        
                my $hash = {};
                bless $hash, "Foobar";
                
        } # end of foobar
        
        #------------------------
        #
        sub fill_foobar
        {
                my ($me, $array_oh_array) = @_;
                
                $me->{max} = @$array_oh_array;
                $me->{count} = 0;
                $me->{stuff} = $array_oh_array;
                
        } # end of fill_foobar
        
        #------------------------
        #
        sub fetch
        {
                my ($me) = @_;
                
                my @array;
                if ($me->{count} < $me->{max} )
                {
                        @array = @{${$me->{stuff}}[$me->{count}++]};
        
                } else
                {
                        $me->{count} = 0;
                        
                }
                
                 return @array;
                
        } # end of fetch


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to