Tag : Select Query

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



Laravel - How to make subquery in select statement?

Sometimes we require to make subquery inside the select statement in Laravel. At that time we are thinking how to select from subquery using in Laravel Query Builder. In this post i will give you example of subquery in select statement in Laravel 5 application from scratch. For subquery in select statement we are going to use <strong class="path">DB::raw()</strong>. DB raw function through we can simply make suquery join in Laravel Eloquent Query Builder. Here as bellow full example, i have three tables as listed bellow: <strong>1)products</strong> <strong>2)products_stock</strong> <strong.....

By Hardik Savani | February 6, 2017 | | 79303 Viewer | Category : Laravel MySql
READ MORE

How to get current year rows using MySql Query PHP?

If you require to get all the records of current year using mysql query. for example you have one table "items" and columns are id, title, description, created_at and update_at, Now you want to get all records of this year. so you can fetch fields value using DATE_SUB and INTERVAL of mysql. In following example you can see how to select data of current year. <strong>Example:</strong> <pre> SELECT * FROM items WHERE created_at > DATE_SUB(NOW(), INTERVAL 1 YEAR); </pre>

By Hardik Savani | June 14, 2016 | | 5516 Viewer | Category : MySql
READ MORE

How to calculate age from date of birth column in mysql?

Sometimes, we require to get age from birthdate using mysql select query, we can do it in programming like php,.net and etc framework but if we can do it using mysql query. In bellow example mysql query you can learn how to get age from date field. We can get age value from using mysql DATEDIFF(). So, let's see bellow query. <strong>Example:</strong> <pre> SELECT id, (DATEDIFF(CURRENT_DATE, STR_TO_DATE(born_date, '%Y-%m-%d'))/365) as age FROM `users` </pre>

By Hardik Savani | June 1, 2016 | | 12902 Viewer | Category : MySql
READ MORE

    Ajax Image Upload Example with Validation in PHP Laravel Framework

    Ajax Image Upload Example with Validation in PHP Laravel Framework

    Open Post

    How to add custom jquery validation for image file upload in summernote ?

    How to add custom jquery validation for image file upload in summernote ?

    Open Post

    PHP Ajax Multiple Image Upload with Preview Example

    PHP Ajax Multiple Image Upload with Preview Example

    Open Post

    Laravel 5 generate sitemap using roumen/sitemap package Example

    Laravel 5 generate sitemap using roumen/sitemap package Example

    Open Post

    Laravel 5 Localization(trans helper) tutorial example

    Laravel 5 Localization(trans helper) tutorial example

    Open Post

    How to create ban/revoke user functionality in Laravel 5 example ?

    How to create ban/revoke user functionality in Laravel 5 example ?

    Open Post