Support Manual Perl While Loop Example If your SQL query will return more than one record, you will need to place the fetchrow() call in a while loop. my (@telephone); my $i = 0; my $count; while (@aRow = $sth->fetchrow()) { $telephone[$i] = @aRow[0]; $i++; } $count = $i; # @telephone can now be used to build an html table # to display all the telephone numbers in the "518" # area code. Overview MySQL Control Panel Feature Examples of SQL Statements Quick Actions Advanced Queries Table Properties Table Select Perl While Loop Example Using MySQL With CGI Scripts References and Tutorials
Perl While Loop Example
my (@telephone); my $i = 0; my $count; while (@aRow = $sth->fetchrow()) { $telephone[$i] = @aRow[0]; $i++; } $count = $i; # @telephone can now be used to build an html table # to display all the telephone numbers in the "518" # area code.
Copyright © 2003-2007 Hosting Connecticut, LLC. Resellers of Hosting Connecticut, LLC. may reproduce this manual on their sites.