|
|
| "be consistent" | |
| PerlMonks |
Re: Outputing data from mySQL query into format for use with HTML::Templateby lachoy (Parson) |
| on Mar 10, 2001 at 03:07 UTC ( #63394=note: print w/ replies, xml ) | Need Help?? |
|
Assuming the fieldnames in your template are the same as the fieldnames in your database, you can do:
This isn't the most efficient but it's the easiest to understand. (And for small datasets like putting tables of data in a web page, you probably won't notice the difference.) Note that if you try a shortcut and push $row directly into @results you'll get the same row over and over. Chris
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||