in reply to printing records in MySQL

Right now I am using the below code but it only retrieves ONE record for some reason when there is 20-30 in the database.

How may records do you have where engine_id='Junk'?
Or do you want ALL records. If so, drop the where clause.

my $useragent = "SELECT engine_id,useragent,ip,date FROM visit WHERE e +ngine_id='Junk'"; $sth = $dbh->prepare($useragent); $sth->execute(); #__THIS__ $sth->bind_columns(\my($engine_id,$useragent,$ip,$date)); while ($sth->fetch()) {; print "<td>$engine_id</td><td>$useragent</td><td>$ip</td><td>$date +</td>"; } #__OR THIS__ while (my @row = $sth->fetchrow_array()) { print "<td>$row[0]</td><td>$row[1]</td><td>$row[2]</td><td>$row[3] +</td>"; }