<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="cs">
	<id>http://postgres.cz/index.php?action=history&amp;feed=atom&amp;title=Hromadn%C3%A9_operace_s_DBI</id>
	<title>Hromadné operace s DBI - Historie editací</title>
	<link rel="self" type="application/atom+xml" href="http://postgres.cz/index.php?action=history&amp;feed=atom&amp;title=Hromadn%C3%A9_operace_s_DBI"/>
	<link rel="alternate" type="text/html" href="http://postgres.cz/index.php?title=Hromadn%C3%A9_operace_s_DBI&amp;action=history"/>
	<updated>2026-05-13T02:19:50Z</updated>
	<subtitle>Historie editací této stránky</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>http://postgres.cz/index.php?title=Hromadn%C3%A9_operace_s_DBI&amp;diff=559&amp;oldid=prev</id>
		<title>imported&gt;Pavel v 2. 9. 2014, 09:48</title>
		<link rel="alternate" type="text/html" href="http://postgres.cz/index.php?title=Hromadn%C3%A9_operace_s_DBI&amp;diff=559&amp;oldid=prev"/>
		<updated>2014-09-02T09:48:22Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nová stránka&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
use DBI;&lt;br /&gt;
&lt;br /&gt;
my $dbh = DBI-&amp;gt;connect(&amp;quot;dbi:Pg:dbname=postgres;host=localhost&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;);&lt;br /&gt;
$dbh-&amp;gt;do(&amp;quot;drop table if exists xxx&amp;quot;);&lt;br /&gt;
$dbh-&amp;gt;do(&amp;quot;create table xxx (a int, b varchar, c varchar, d date, e numeric)&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
my $i;&lt;br /&gt;
my $sql;&lt;br /&gt;
$sql = &amp;quot;insert into xxx values (?,?,?,?,?)&amp;quot;;&lt;br /&gt;
my $stmt = $dbh-&amp;gt;prepare($sql);&lt;br /&gt;
my (@data1, @data2, @data3, @data4, @data5);&lt;br /&gt;
&lt;br /&gt;
for ($i = 0; $i &amp;lt; 10; $i++)&lt;br /&gt;
{&lt;br /&gt;
    $data1[$i] = $i;&lt;br /&gt;
    $data2[$i] = &amp;quot;this is a char thirty&amp;quot;;&lt;br /&gt;
    $data3[$i] = &amp;quot;this is a varchar 255&amp;quot;;&lt;br /&gt;
    $data4[$i] = &amp;quot;2002-08-01 11:12:13.123&amp;quot;;&lt;br /&gt;
    $data5[$i] = $i * 1.1;&lt;br /&gt;
}&lt;br /&gt;
$stmt-&amp;gt;bind_param_array(1, \@data1);&lt;br /&gt;
$stmt-&amp;gt;bind_param_array(2, \@data2);&lt;br /&gt;
$stmt-&amp;gt;bind_param_array(3, \@data3);&lt;br /&gt;
$stmt-&amp;gt;bind_param_array(4, \@data4);&lt;br /&gt;
$stmt-&amp;gt;bind_param_array(5, \@data5);&lt;br /&gt;
&lt;br /&gt;
$data2 = &amp;quot;this is a char thirty&amp;quot;;&lt;br /&gt;
$data3 = &amp;quot;this is a varchar 255&amp;quot;;&lt;br /&gt;
$data4 = &amp;quot;2002-08-01 11:12:13.123&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
my %status;&lt;br /&gt;
&lt;br /&gt;
for ($i = 1; $i &amp;lt;= 2; $i++) {&lt;br /&gt;
    $data5 = $i * 1.1;&lt;br /&gt;
    $stmt-&amp;gt;execute_array(\%status);&lt;br /&gt;
}&lt;br /&gt;
$dbh-&amp;gt;disconnect();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>imported&gt;Pavel</name></author>
	</entry>
</feed>