You can most likely preclude empty/invalid data with SQL. Let's say your field/column name is 'name'. Then with your DBI prepare() call, you can preclude records where name is blank, null, or whatever you'd like.
$sth = $dbh->prepare( 'SELECT * FROM table WHERE name IS NOT NULL' ); $sth->execute; # Proceed with your fetchrow_hashref()'s, etc HTH & Have Fun! Jason "T. Murlidharan Nair" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi!! > I have a CGI that looks up data from a mysql data base and > does a bunch of calculations. I only want to do calculations > on the columns which contains any data. What I mean is for > some colums there is no data available at all. So I don't want to do > any calculations on them obviously. How do I check whether > the column contains data, once I have retrived all the data > using fetchrow_hashref(). > Thanks and Cheers alway!! > Murli > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]