R
R
Rishat Sultanov2017-05-03 06:39:37
Laravel
Rishat Sultanov, 2017-05-03 06:39:37

How to process this request to the database?

Good morning gentlemen :)
How to make a request through the DB facade:

set @n = 0;
update `your_table` set `id` = (select @n := @n + 1);

I didn't particularly find the example I needed in the documentation.
And is there a way for the DB Facade to query a normal query like:
'My query' without using the DB facade functions.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin B., 2017-05-03
@Kostik_1993

DB::raw( your query );

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question