# CREATE TABLE Customer ( # id_cust int auto_increment primary key, # login varchar(255) not null, # pass varchar(255) not null, # name varchar(255) not null, # email varchar(255) not null, # ) ; # INSERT INTO Customer SET login='powerman', pass='11111', # name='Alex', email='root@localhost' ; # SELECT LAST_INSERT_ID() ; %Q = ( login => "powerman", pass => "11111", name => "Alex", email => "root@localhost", BADKEY => "QWEQWE", ); $id_cust = $dbh->Insert("Customer", \%Q); # UPDATE Customer SET pass='22222', name='Alex Efros' # WHERE id_cust=1 ; %Q = ( id_cust => 1, pass => '22222', name => 'Alex Efros', ); $dbh->Update("Customer", \%Q); # REPLACE INTO Customer SET id_cust=1, pass='33333' ; $dbh->Replace("Customer", {id_cust=>1, pass=>'33333'}); # DELETE FROM Customer WHERE login='powerman' AND pass='33333' ; $dbh->Delete("Customer", {login=>"powerman", pass=>"33333"}); # SELECT id_cust FROM Customer WHERE login='powerman' AND pass='33333' ; $id_cust = $dbh->ID("Customer", {login=>'powerman', pass=>'33333'}) # SELECT count(*) as __count FROM Customer $count = $dbh->Count("Customer"); # SELECT * FROM Customer @all_customers = $dbh->Select("Customer"); # SELECT * FROM Customer WHERE id_cust=1 ; $Cust = $dbh->Select("Customer", {id_cust=>1});