in reply to MySQL confusion
If you have &member=me&member=you then CGI.pm's param("member") would return ("me","you") which could explain what you are noticing. param("member") could also return 0 items and give you the opposite error.
You might try (param("member"))[-1] so that only the last one specified is used. But, for some reason, (emptyList)[-1] is an empty list (I expected it to be undef), so to be extra safe use:
perhaps with some extra safety checks thrown in.my $member= (param("member"))[-1]; my $group= (param("group"))[-1]; $sth->execute( $member, $group ) ...
You could also use scalar or ''.param("member") to work around the problem (plus lots of other possiblities), but I like those solutions less.
- tye (but my friends call me "Tye")
|
|---|