Ver Fonte

[ZF-10974]: Zend_Db performance: fix incorrect example

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@23643 44c647ce-9c0f-0410-b52a-842ac1e357ba
mikaelkael há 15 anos atrás
pai
commit
f5d97603f4
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      documentation/manual/en/ref/performance-database.xml

+ 2 - 2
documentation/manual/en/ref/performance-database.xml

@@ -91,7 +91,7 @@
             <para>
                 If the <acronym>SQL</acronym> requires variable arguments, provide placeholders in
                 the <acronym>SQL</acronym>, and utilize a combination of
-                <methodname>vsprintf()</methodname> and <methodname>array_walk()</methodname> to
+                <methodname>vsprintf()</methodname> and <methodname>array_map()</methodname> to
                 inject the values into the <acronym>SQL</acronym>:
             </para>
 
@@ -100,7 +100,7 @@
 // it using $this->getAdapter().
 $sql = vsprintf(
     self::SELECT_FOO,
-    array_walk($values, array($adapter, 'quoteInto'))
+    array_map(array($adapter, 'quoteInto'), $values)
 );
 ]]></programlisting>
         </sect3>