使用Laravel插入延迟

问题描述:

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

如何使用Laravel的Fluent完成MySQL子句 INSERT DELAYED code>? p> div>

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