|The stupid question is the question not asked|
How can I display an entire MySQL table in Perl?by bladx (Chaplain)
|on Jan 02, 2002 at 02:50 UTC||Need Help??|
bladx has asked for the
wisdom of the Perl Monks concerning the following question:
Currently I am learning how to wed MySQL with Perl, and use it for database/internet use. To do this, I of course am using the DBI module. I understand how to search for an id field in Perl by using DBI, but I don't know how I can display a whole table from MySQL in a Perl script. Is there a way to do this?
Currently, my MySQL table has columns:
Which is simply an example for a short tutorial site. Also the Perl script I am using is this:
So far this program does what I want it to, but when I try adding the line:
instead of the line:
Basically my question is what the title says: Is there a way I can display all of the contents of that MySQL table in the Perl script? Any help on this subject would be much appreciated. I have found that learning how to use Perl with MySQL is actually fun, and somewhat easy. I just don't know how to this type of thing. Maybe I am not in the right frame of mind ... anyways, any help would be appreciated!