Changing row color with subroutine

2002-11-22 Thread Poster
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 td bgcolor=$bgcolortable cell value/td

Re: Changing row color with subroutine

2002-11-22 Thread zentara
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 @_

arrays lists

2002-11-22 Thread Al Hospers
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

multiple selection

2002-11-22 Thread Mike(mickako)Blezien
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

RE: Changing row color with subroutine - a shortcut...

2002-11-22 Thread Peter Kappus
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;

Re: arrays lists

2002-11-22 Thread Octavian Rasnita
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

RE: Changing row color with subroutine - a shortcut...

2002-11-22 Thread dirk van der Giesen
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 = 'nbsp;'; push(@rows,td({-colspan='6',-bgcolor='#FF'},[$th]));