Tag : DB Statement

ItSolutionStuff.com have tutorials for DB Statement tag, here you can study articles of DB Statement tag, DB Statement tag posts collection, most popular and useful tutorials of DB Statement tag, here you can find list of all relevant posts and example about DB Statement tag, we have lists of tutorials and examples about DB Statement tag. very simple and quick example collection of Latest DB Statement tag.

How to execute mysql query in laravel?

Sometimes, we require to run directly mysql query on Laravel for example if you need to copy one table to other table using mysql query. I also need in one project and that's why i am fetching problem. But you can use sql query on laravel using db statement in bellow example you can learn how to run. <strong>Example:</strong> <pre class="prettyprint lang-php"> DB::statement(" INSERT INTO `posts` (repost_of_id,token_id,post_details,user) SELECT id,token_id,post_details,".$loginUserId." FROM `posts` where id = ".$postId." "); </pre>

By Hardik Savani | May 2, 2016 | | 19240 Viewer | Category : Laravel