sub checkDuplicateName { ## args my($db, $name) = @_; ## important! do not forget to quote name $quotedName = $db->quote( $name ); ## select statement to count number of occurences my $select = "select count(*) from customers where names=$quote +dName"; ## atomic fetch my( $toReturn ) = $db->selectrow_array( $select ); ## return value return $toReturn; }
Will perl for money
JJ Knitis
(901) 756-7693
gt8073a@industrialmusic.com
In reply to Re: Database stuff
by gt8073a
in thread Database stuff
by Raziel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |