Skip to content

Commit

Permalink
Remove check for camp count in get_next_camp_number_mysql
Browse files Browse the repository at this point in the history
* get_next_camp_number_mysql checks for the number of camps in the system and if no camps are returned it defaults the next camp number to be 1 when it should really be the first available number in camp_numbers.
* Removed the check for the count of camps and the proper camp number is now returned
  • Loading branch information
rphipps committed Jun 16, 2009
1 parent c676d23 commit a0deb94
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/Camp/Master.pm
Expand Up @@ -718,8 +718,6 @@ sub _get_next_camp_number_pg {

sub _get_next_camp_number_mysql {
my $db = dbh();
my ($count) = $db->selectrow_array(q{SELECT COUNT(*) FROM camps WHERE camp_number > 0});
return 1 unless $count;
my ($id) = $db->selectrow_array(<<'SQL');
SELECT MIN( cn.number )
FROM camp_numbers cn
Expand Down

0 comments on commit a0deb94

Please sign in to comment.