develooper Front page | perl.beginners | Postings from April 2002

Re: DBD-ODBC - WIN2K - ACCESS

Thread Previous
From:
Frank Wiles
Date:
April 26, 2002 07:39
Subject:
Re: DBD-ODBC - WIN2K - ACCESS
Message ID:
20020426093906.268b97bf.frank@rev-sys.com

> while ( (my $id, my $name, my $par, my $time) = $sth->fetchrow) {
> 	print start_html(-title=>"Noticia:
> $name",-style=>({-src=>"/_include/portal.css"}));
> 	print h3("$name"),
> 		p("$par"),
> 		#p("$par1"),
> 		p("$time"),
> 		p(a({-href=>'/noticias/index1.shtml'},'<<indice de noticias'));
> }

   I doubt this will solve your problem, but I thought I would mention it anyway. 
   I would suggest this code change for readability and reducing the amount
   you  have to type.  Try: 

   while( my ($id, $name, $par, $time) = $sth->fetchrow ) { 

   }

   Instead of 'my'ing each variable. 

   You might also try putting the start_html() outside of the while{} block 
   and just looping on the print statment if that query returns more than
   one row. 

  ---------------------------------
   Frank Wiles <frank@rev-sys.com> 
   Revolution Systems, LLC. 
  ---------------------------------



Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About