Nyxynyx
Nyxynyx

Reputation: 63647

INSERT DELAYED using Laravel

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

Upvotes: 1

Views: 1607

Answers (1)

Jason Lewis
Jason Lewis

Reputation: 18665

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

Upvotes: 7

Related Questions