Help for this page

Select Code to Download


  1. or download this
    my %Q = CGI::Vars();
    ...
    $id_cust = AddCusomer($Q{login}, $Q{pass}, $Q{name}, $Q{email}, ...)
    ...
            or return;
        $dbh->selectrow_array("SELECT LAST_INSERT_ID()");
    }
    
  2. or download this
    my %Q = CGI::Vars();
    ...
    $id_cust=$dbh->Insert("Customer", \%Q) if $Q{pass} eq $Q{confirmpass};
    
  3. or download this
    # CREATE TABLE Customer (
    #       id_cust int auto_increment primary key,
    #       login varchar(255) not null,
    ...
    
    # SELECT * FROM Customer WHERE id_cust=1 ;
    $Cust = $dbh->Select("Customer", {id_cust=>1});
    
  4. or download this
    # CREATE TABLE Cust (
    #       id_cust int auto_increment primary key,
    #       id_country int,
    ...
        );
    @search_result = $dbh->Select(["Customer", "SelectedGoods",
        "Goods", "Country"], \%Q);
    
  5. or download this
    $dbh->Update("Customer", \%Q);
  6. or download this
    %Q = CGI::Vars();
    delete $Q{$_} for grep {m/^_/} keys %Q;
    
  7. or download this
    $Q{_balance} = $Q{Set_balance} if $Admin and $Q{Set_balance};
    $dbh->Insert("Customer", \%Q);
    
  8. or download this
    $Q{_balance} = $Q{Set_balance} if $Admin and $Q{Set_balance};
    $dbh->Insert("Customer", {%Q, id_cust=>$CustID});