Tag : FIND_IN_SET()


Laravel - How to search with comma separated values using Query Builder ?

Sometimes, we require to manage to take single column for multiple integer ids, for example if we have "posts" table and require to set multiple tags on each post, so at that time we can take just single column and store selected tags ids. this way will use less memory. It is simple to store data into row, but as you think how we can search or find specific tag id data from comma separated column value using laravel query builder. However, It is possible using <strong class="path">"find_in_set()"</strong> of MySql predefine function, We can use find_in_set() using whereRow() of laravel query .....

By Hardik Savani | March 2, 2017 | | 3490 Viewer | Category : Laravel MySql
READ MORE

MySql comma separated column join in PHP Laravel 5

If we work in big application or project of Laravel Framework, sometimes we require to manage column value into comma separated because we can save memory of database. But if we store comma separated value in column with ids then it's difficult to inner join or left join and get records from another tables. However, SQL provide FIND_IN_SET() for checking value one by one, that way we can also search from comma separated value. FIND_IN_SET() will help to join with tables and we can simply get data. In this post, I will give you full example of how to get data from comma separated column table.....

By Hardik Savani | January 7, 2017 | | 4417 Viewer | Category : PHP Laravel MySql SQL
READ MORE

    AngularJS - Display Default image if original image does not exists with example

    AngularJS - Display Default image if original image does not exists with example

    Open Post

    Laravel 5 - Implementing datatables tutorial using yajra package

    Laravel 5 - Implementing datatables tutorial using yajra package

    Open Post

    How to get last inserted id in Codeigniter?

    How to get last inserted id in Codeigniter?

    Open Post

    Laravel 5 - generate PDF from html view file and download using dompdf

    Laravel 5 - generate PDF from html view file and download using dompdf

    Open Post

    How to call AngularJS controller function in Jquery?

    How to call AngularJS controller function in Jquery?

    Open Post

    Jquery email autocomplete example with demo using jquery.email-autocomplete.min.js

    Jquery email autocomplete example with demo using jquery.email-autocomplete.min.js

    Open Post