Help for this page

Select Code to Download


  1. or download this
    my $username = 'LanX';
    my $req1 = $db->xprepare(ph { "SELECT from users WHERE nick = '$userna
    +me'" });
    $username = 'Eily';
    my $req2 = $db->xprepare(ph { "SELECT from users WHERE nick = '$userna
    +me'" });
    $req1->xexecute();
    $req2->xexecute();
    
  2. or download this
    my $username = 'LanX';
    my $req1 = $db->prepare("SELECT from users WHERE nick = '$username'");
    $username = 'Eily';
    my $req2 = $db->prepare("SELECT from users WHERE nick = '$username'");
    $req1->execute();
    $req2->execute();
    
  3. or download this
    $first_node = 1210590;
    $first  = $dbh->xdo(ph { "SELECT * WHERE node_id = $first_node" }); # 
    +Calls prepare and execute
    $second_node = 1210586;
    $second = $dbh->xdo(ph { "SELECT * WHERE node_id = $second_node" }); #
    + Same query, skips prepare, calls execute
    $third_node = 1210578;
    $third  = $dbh->xdo(ph { "SELECT * WHERE node_id = $third_node " }); #
    + Prepare still not called
    
  4. or download this
    my %default = (rank => "Pope", xp => 4);
    my $req = $dbh->xprepare(ph { "SELECT * FROM users WHERE rank = $_{ran
    +k} AND xp > $_{xp} AND username != $_{username}" } %default);
    $req->execute(rank => "Prior", username => "Eily");