I rememeber sometimes doing something like this when
using CGI.pm and DBI.pm
push(@rows,td({-colspan=>'6',-bgcolor=>'#FF'},[$th]));
#blank row
$th = ' ';
push(@rows,td({-colspan=>'6',-bgcolor=>'#FF'},[$th]));
push(@rows,td({-bgcolor=>'#FFCC99'},['',b('V
First I need to tell you that I am not a MySQL specialist and my opinion
might be wrong butI think that:
1. You'll better use where day=$day and where month=$month because it works
faster than using the "like" operator.
2. I think MySQL has a function for returning random numbers, so you better
u
Another neat trick I use to get subroutine arguments is the old "shift"
function without an argument.
Since, @_ is the default array in a subroutine you can just say
my $firstParm = shift; #shift off the first arg from @_
Therefore,
print add(30,50);
sub addTwo{
my $firstNum = shift;
Hello all,
having a problem with processing multiple selection from a scrolling list...
first time working with tha scrolling list. Here is the test script I'm working
with:
#!/usr/local/bin/perl
use CGI qw(:standard);
$action = param('action');
print header();
print start_html();
if (!$actio
hi
I know I am missing a lot in my knowledge, but I'm trying to figure
something out & seemingly am in a hole...
the task is as follows:
1) query a mysql database for as many records as match a criteria
(I can do this OK)
2) put the resulting records, how ever many there are, into a lis
On Fri, 22 Nov 2002 03:28:39 -0800, [EMAIL PROTECTED] (Poster) wrote:
>Hi, I am having a little trouble with a sub that is using the modulus
>operator.
Yeah, it fooled me too for a bit :-)
The problem is the way you pass the value to the
sub, @_ always is 1, the count of elements in @_.
Change @_
Hi, I am having a little trouble with a sub that is using the modulus
operator.
It is called here-within a while loop:
while (my $row = $sth->fetchrow_hashref()) {
count++;
color_rows( $count )
--some other stuff
table cell value
-some other stuff
}