Created
September 2, 2014 05:01
-
-
Save korjavin/bdce7414683f2609649e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/perl -w | |
| $dbh = | |
| DBI->connect( "DBI:mysql:dbname=mydb;", "root", "mypass", | |
| { RaiseError => 0, PrintError => 0, AutoCommit => 1 } ); | |
| $dbh->{'mysql_auto_reconnect'} = 1; | |
| $stu1 = $dbh->prepare("update smt set value=?"); | |
| $sti1 = $dbh->prepare("insert int bbb values (?,?)"); | |
| $koeff=1; | |
| $stu1->execute( $koeff ); | |
| for($i=1;$i<100;$i++){ | |
| $sti1->execute( $i,$i+1 ); | |
| } | |
| $stu1->finish; | |
| $sti1->finish; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment