<i id='qZOND'><tr id='qZOND'><dt id='qZOND'><q id='qZOND'><span id='qZOND'><b id='qZOND'><form id='qZOND'><ins id='qZOND'></ins><ul id='qZOND'></ul><sub id='qZOND'></sub></form><legend id='qZOND'></legend><bdo id='qZOND'><pre id='qZOND'><center id='qZOND'></center></pre></bdo></b><th id='qZOND'></th></span></q></dt></tr></i><div id='qZOND'><tfoot id='qZOND'></tfoot><dl id='qZOND'><fieldset id='qZOND'></fieldset></dl></div>

<small id='qZOND'></small><noframes id='qZOND'>

    <legend id='qZOND'><style id='qZOND'><dir id='qZOND'><q id='qZOND'></q></dir></style></legend>
      <bdo id='qZOND'></bdo><ul id='qZOND'></ul>
    <tfoot id='qZOND'></tfoot>
      1. 教义 - 只用一个 save() 插入多行

        Doctrine - insert multiple rows with just one save()(教义 - 只用一个 save() 插入多行)

          <tbody id='5jddG'></tbody>

        <small id='5jddG'></small><noframes id='5jddG'>

          • <tfoot id='5jddG'></tfoot>
              <legend id='5jddG'><style id='5jddG'><dir id='5jddG'><q id='5jddG'></q></dir></style></legend>

                <i id='5jddG'><tr id='5jddG'><dt id='5jddG'><q id='5jddG'><span id='5jddG'><b id='5jddG'><form id='5jddG'><ins id='5jddG'></ins><ul id='5jddG'></ul><sub id='5jddG'></sub></form><legend id='5jddG'></legend><bdo id='5jddG'><pre id='5jddG'><center id='5jddG'></center></pre></bdo></b><th id='5jddG'></th></span></q></dt></tr></i><div id='5jddG'><tfoot id='5jddG'></tfoot><dl id='5jddG'><fieldset id='5jddG'></fieldset></dl></div>
                  <bdo id='5jddG'></bdo><ul id='5jddG'></ul>

                  本文介绍了教义 - 只用一个 save() 插入多行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如何在 Doctrine 中将多行插入一次调用 save() 方法的表中?

                  How do I insert multiple rows into table calling save() method once in Doctrine?

                  推荐答案

                  将每条记录添加到 Doctrine_Collection 对集合对象的调用 save().

                  $collection = new Doctrine_Collection('tablename');
                  $collection->add($record1);
                  $collection->add($record2);
                  $collection->add($record3);
                  $collection->add($record4);
                  $collection->save();
                  

                  这仅适用于所有记录都针对同一个表的情况.否则你就不走运了.

                  This only works if all the records are for the same table. Otherwise you're out of luck.

                  这篇关于教义 - 只用一个 save() 插入多行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                    <tbody id='1Mp6L'></tbody>

                    <legend id='1Mp6L'><style id='1Mp6L'><dir id='1Mp6L'><q id='1Mp6L'></q></dir></style></legend>
                        <i id='1Mp6L'><tr id='1Mp6L'><dt id='1Mp6L'><q id='1Mp6L'><span id='1Mp6L'><b id='1Mp6L'><form id='1Mp6L'><ins id='1Mp6L'></ins><ul id='1Mp6L'></ul><sub id='1Mp6L'></sub></form><legend id='1Mp6L'></legend><bdo id='1Mp6L'><pre id='1Mp6L'><center id='1Mp6L'></center></pre></bdo></b><th id='1Mp6L'></th></span></q></dt></tr></i><div id='1Mp6L'><tfoot id='1Mp6L'></tfoot><dl id='1Mp6L'><fieldset id='1Mp6L'></fieldset></dl></div>
                        • <bdo id='1Mp6L'></bdo><ul id='1Mp6L'></ul>

                          <tfoot id='1Mp6L'></tfoot>
                          1. <small id='1Mp6L'></small><noframes id='1Mp6L'>