MySQL has a count function. You can simplify your second query to:
my $sth = $dbh->prepare( "SELECT COUNT(*) FROM workspace WHERE name = +?"); $sth->execute( $workspace ); my ($count) = $sth->fetchrow_array();
I'm not sure what your $mysql contains, so I can't give you much more detail, but this is the standard DBI code.
In reply to Re: Now to do simple select with Net::MySQL
by chromatic
in thread How to do simple select with Net::MySQL
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |