bengalliboy
MIS
I am using perl DBI module to get data back from database in array format. The code I have so far looks like this:
$rows = $dbh->selectall_arrayref("show SELECT * FROM table SAMPLE 3");
foreach $h (@$rows) {
foreach $x (@$h) {
printf "%s\n", $x;
}}
After I put a break in debug mode I see my data like this: (the $h)
-----------------------------------------------
0 ARRAY(0x32c40f8)
0 "CREATE SET TABLE (my contents....)
----------------------------------------------
My questions are: 1. How do I know how big is the array and
2. How do I print all the contents that is I want - "CREATE SET TABLE (my contents....)
Please someone shed some idea and Thank you...
$rows = $dbh->selectall_arrayref("show SELECT * FROM table SAMPLE 3");
foreach $h (@$rows) {
foreach $x (@$h) {
printf "%s\n", $x;
}}
After I put a break in debug mode I see my data like this: (the $h)
-----------------------------------------------
0 ARRAY(0x32c40f8)
0 "CREATE SET TABLE (my contents....)
----------------------------------------------
My questions are: 1. How do I know how big is the array and
2. How do I print all the contents that is I want - "CREATE SET TABLE (my contents....)
Please someone shed some idea and Thank you...