Here's a quick question which I can't seem to find the answer to..
How can you tell if a table in the database is empty? All I could think of was something like the following, but obvoiusly that's not right.
my $query= "SELECT id FROM users LIMIT 1";
my $sth=$dbh->do($query) or DBerror();
if ($sth->fetchrow_array == undef) {
...
}