drzfnr0275 2012-09-24 01:50
浏览 330
已采纳

使用Laravel插入延迟

How can a MySQL clause INSERT DELAYED be done using Laravel's Fluent?

  • 写回答

1条回答 默认 最新

  • douhu4091 2012-09-24 02:03
    关注

    You can't, at least not with Fluent. Laravel provides you with ways to execute raw queries by way of the DB::query() method.

    With DB::query() you should be able to achieve your desired results.

    If for whatever reason it's not working like it should, which mind you for some queries with DB::query() they still just don't work, then you'll need to use the raw PDO object. You can get the PDO object via DB::connection()->pdo, remember if you're using a custom connection and not the default as defined in your configuration you'll need to pass it in to DB::connection('connection_name')

    Further information can be found on the Laravel docs: http://laravel.com/docs/database/raw

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 再不同版本的系统上,TCP传输速度不一致
  • ¥15 高德地图点聚合中Marker的位置无法实时更新
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式