padawan_linuxero has asked for the wisdom of the Perl Monks concerning the following question:
I trim the amount of the data being inserted but still a viable example. I hope someone can explain it a little bit more with an example, sorry if these is to much work, I really like perl has help me do things that would take a lot of time doing in something else, it just that I did not get it . Thank you !my $dbhX1 = DBI->connect('dbi:XBase(RaiseError=1):'); my $select1 = $dbhX1->prepare("SELECT * FROM r501"); $select1->execute(); print "\nEjecutar SELECT de r501\n"; my $mysql_dbh1 = DBI->connect("DBI:mysql:database=$datafilename;ho +st=localhost", "root", "xyz123", {'RaiseError' => 1}); while ( (my @row) = $select1 -> fetchrow_array() ){ my $sthsql = $mysql_dbh1->prepare ("INSERT INTO r501 (reg, pat, ped, + adnasec, impexp, cveped, adnaent, crupimp, rfcimp, curpaa) VALUES ($row[0], $row[1], $row[2] +, $row[3], $row[4], $row[5], $row[6], $row[7], $row[8], $row[9]") $sthsql->execute(); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: I got confuse with INSERT
by grep (Monsignor) on Mar 14, 2008 at 23:59 UTC | |
by padawan_linuxero (Scribe) on Mar 17, 2008 at 16:16 UTC | |
by grep (Monsignor) on Mar 17, 2008 at 20:41 UTC | |
by padawan_linuxero (Scribe) on Mar 24, 2008 at 18:36 UTC | |
by twotone (Beadle) on Aug 17, 2008 at 00:15 UTC |