Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Odd Database Behavior

by grinder (Bishop)
on Dec 15, 2003 at 20:15 UTC ( #314896=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub nick_exists {
      return $db->do( "select 1 from members where nickname="   
        . $db->quote($_[0])
      );
    }
    
  2. or download this
    BEGIN {
    my $ss = $db->prepare( 'select 1 from members where nickname=?' ) or d
    +ie;
    ...
        $res and defined $res->[0] ? 1 : 0;
    }
    }
    
  3. or download this
    use Memoize;
    memoize('nick_exists');
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://314896]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2021-04-16 19:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?