<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=380518&amp;view=findpost&amp;p=3888771</guid>
        <pubDate>Tue, 28 Mar 2023 13:17:37 +0000</pubDate>
        <title>SELECT без PREPARE в DBI</title>
        <link>https://forum.sources.ru/index.php?showtopic=380518&amp;view=findpost&amp;p=3888771</link>
        <description><![CDATA[Tishaishii: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=380518&view=findpost&p=3343026'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>rlib &#064; <time class="tag-quote__quoted-time" datetime="2013-08-05T07:48:17+00:00">05.08.13, 07:48</time></span><div class='quote '><div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=380518&view=findpost&p=3342975'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Adil &#064; <time class="tag-quote__quoted-time" datetime="2013-08-04T22:06:31+00:00">04.08.13, 22:06</time></span><div class='quote '></div></div><br>
<br>
Хм... Хочу сделать селект без предварительного препаре в явном или неявном виде. Сделал бы с dbh-&gt;do() если бы было возможно.</div></div><br>
А что происходит во время `prepare`? Мне так кажется, компиляция запроса. А СУБД умеет работать с некомпилированными запросами? Сдаётся мне, нет. Так как сам язык запросов SQL КОМПИЛИРУЕМЫЙ.<br>
<br>
На вопрос есть только ответ, что вам нужно передавать бинарные данные скомпилированного запроса (там чёрт ногу сломит и с чего начать) без использования SQL. <br>
<br>
<span class="tag-color tag-color-named" data-value="mergepost" style="color: mergepost"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2023-03-28T16:18:41+03:00">28.03.23, 13:18</time></span></span><br>
Ну, ещё можно `prepare_cached`.]]></description>
        <author>Tishaishii</author>
        <category>Perl</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=380518&amp;view=findpost&amp;p=3343026</guid>
        <pubDate>Mon, 05 Aug 2013 07:48:17 +0000</pubDate>
        <title>SELECT без PREPARE в DBI</title>
        <link>https://forum.sources.ru/index.php?showtopic=380518&amp;view=findpost&amp;p=3343026</link>
        <description><![CDATA[rlib: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=380518&view=findpost&p=3342975'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Adil &#064; <time class="tag-quote__quoted-time" datetime="2013-08-04T22:06:31+00:00">04.08.13, 22:06</time></span><div class='quote '></div></div><br>
<br>
Хм... Хочу сделать селект без предварительного препаре в явном или неявном виде. Сделал бы с dbh-&gt;do() если бы было возможно.]]></description>
        <author>rlib</author>
        <category>Perl</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=380518&amp;view=findpost&amp;p=3342975</guid>
        <pubDate>Sun, 04 Aug 2013 22:06:31 +0000</pubDate>
        <title>SELECT без PREPARE в DBI</title>
        <link>https://forum.sources.ru/index.php?showtopic=380518&amp;view=findpost&amp;p=3342975</link>
        <description><![CDATA[Adil: Тогда точнее сформулируйте вопрос.]]></description>
        <author>Adil</author>
        <category>Perl</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=380518&amp;view=findpost&amp;p=3342941</guid>
        <pubDate>Sun, 04 Aug 2013 15:19:22 +0000</pubDate>
        <title>SELECT без PREPARE в DBI</title>
        <link>https://forum.sources.ru/index.php?showtopic=380518&amp;view=findpost&amp;p=3342941</link>
        <description><![CDATA[rlib: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=380518&view=findpost&p=3342938'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Gonarh &#064; <time class="tag-quote__quoted-time" datetime="2013-08-04T15:09:06+00:00">04.08.13, 15:09</time></span><div class='quote '>&#036;hDB-&gt;selectall_arrayref</div></div><br>
<br>
Не, не оно.<br>
<br>
selectall_arrayref<br>
<br>
  &#036;ary_ref = &#036;dbh-&gt;selectall_arrayref(&#036;statement);<br>
  &#036;ary_ref = &#036;dbh-&gt;selectall_arrayref(&#036;statement, &#092;%attr);<br>
  &#036;ary_ref = &#036;dbh-&gt;selectall_arrayref(&#036;statement, &#092;%attr, @bind_values);<br>
<br>
This utility method combines <strong class='tag-b'>&quot;prepare&quot;</strong>, &quot;execute&quot; and &quot;fetchall_arrayref&quot; into a single call. It returns a reference to an array containing a reference to an array (or hash, see below) for each row of data fetched.]]></description>
        <author>rlib</author>
        <category>Perl</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=380518&amp;view=findpost&amp;p=3342938</guid>
        <pubDate>Sun, 04 Aug 2013 15:09:06 +0000</pubDate>
        <title>SELECT без PREPARE в DBI</title>
        <link>https://forum.sources.ru/index.php?showtopic=380518&amp;view=findpost&amp;p=3342938</link>
        <description><![CDATA[Gonarh: Оно, не?<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">$hDB = DBI-&#62;connect(&quot;DBI:mysql:$db_name;$db_host&quot;, $db_user, $db_pass, {&#39;RaiseError&#39; =&#62; 1});</div><div class="code_line">my $data = $hDB-&#62;selectall_arrayref( &quot;SELECT field1, field2 FROM table&quot; );</div><div class="code_line">$hDB-&#62;disconnect;</div><div class="code_line">for my $item (@$data) {</div><div class="code_line">&nbsp;&nbsp;my ( $field1, $field2 ) = @$item; </div><div class="code_line">&nbsp;&nbsp;...</div><div class="code_line">&nbsp;&nbsp;next;</div><div class="code_line">}</div><div class="code_line">undef($data);</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script>]]></description>
        <author>Gonarh</author>
        <category>Perl</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=380518&amp;view=findpost&amp;p=3342929</guid>
        <pubDate>Sun, 04 Aug 2013 13:42:51 +0000</pubDate>
        <title>SELECT без PREPARE в DBI</title>
        <link>https://forum.sources.ru/index.php?showtopic=380518&amp;view=findpost&amp;p=3342929</link>
        <description><![CDATA[rlib: Собственно, сабж.<br>Есть ли возможность делать SELECT без PREPARE? Цель: использование pg_bouncer с transaction pooling.]]></description>
        <author>rlib</author>
        <category>Perl</category>
      </item>
	
      </channel>
      </rss>
	