Category : MySql


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 | | 4238 Viewer | Category : MySql
READ MORE

How to get last inserted id in Codeigniter?

Sometimes, we require to get last insert record id from database in controller, so in this example we will learn how to get last inserted row id in Codeigniter 3 project. It's very often need to get last insert id in programming field, if you are working on Codeigniter framework and you want to fetch last created id, i mean max id, then you do easily.Codeigniter provide method insert_id() to get last inserted id. insert_id() is function of "db" library. db library provides several function for connecting database task. insert_id() will return id of last inserted record. So here i give contro.....

By Hardik Savani | February 28, 2017 | | 2783 Viewer | Category : MySql
READ MORE

Codeigniter 3 - CRUD(Create, Read, Update and Delete) using JQuery Ajax, Bootstrap, Models and MySQL

Today, i am going to share with you how to create CRUD Application with pagination using JQuery Ajax in Codeigniter 3. CRUD is a basic step of any Core Language or framework. CRUD stand for Create Read Update and Delete. So in this post we will learn insert update delete in codeigniter using jquery Ajax. I gave you example from scratch so if you don't know about Codeigniter 3 then no issue. You have to just follow simple step. There are listed bellow step you have to follow: <strong>1)Download Fresh Codeigniter 3</strong> <strong>2)Create Database and Configuration</strong> <strong>3)Add Ro.....

By Hardik Savani | February 19, 2017 | | 115420 Viewer | Category : MySql
READ MORE

PHP - Bootstrap autocomplete tokenfield with Ajax Example

In this post, i am share with you example of how to make tokenfield autocomplete with ajax in PHP. I will give you very simple example so you can easily use with your core PHP Project and other framework like Laravel, codeigniter etc. Here in this example we use Bootstrap tokenfield plugin for tags ajax autocomplete. tokenfield plugin is advanced tagging/tokenizing plugin for jQuery and Twitter Bootstrap with a focus on keyboard and copy-paste support. tokenfield plugin also provide typeahead js for tags autocomplete, But it this example i use jquery ui for autocomplete ajax. In this example.....

By Hardik Savani | February 10, 2017 | | 23627 Viewer | Category : MySql
READ MORE

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 | | 17819 Viewer | Category : MySql
READ MORE

PHP - Input multiple tags with dynamic autocomplete example

In this post i am going to give you the example of Add Multiple input tags with autocomplete from MySQL database table using typeahead bootstrap JS and tagmanager JS. Sometimes we require to make multiple input tags on our form. At that time we require to use jquery plugin for input multiple tags. But here we are going to use tagmanager.js plugin for add multiple input tags. I already added one simple tutorial for tagmanager.js here : <a href="http://itsolutionstuff.com/post/bootstrap-input-multiple-tags-example-using-tag-manager-jquery-pluginexample.html" target="_blank">Bootstrap - Input mu.....

By Hardik Savani | January 24, 2017 | | 21360 Viewer | Category : MySql
READ MORE

Laravel 5 dynamic autocomplete search using select2 JS Ajax - Part 1

Today, I am going to share with you how to make dynamic autocomplete select dropdown from database using select2.js plugin in our Laravel 5 application. Why we have to use autocomplete for our project ?, Sometimes we have more or thousands of records on our tables like users, products, tags etc, so that can not possible to handle in manage from select box. But you must require to make select dropdown for your products tables then you can do it using select2.js plugin. I already post autocomplete with Bootstrap Typeahead Plugin(<a href="http://itsolutionstuff.com/post/laravel-5-autocomplete-us.....

By Hardik Savani | January 19, 2017 | | 12457 Viewer | Category : MySql
READ MORE

Laravel 5 dynamic autocomplete search using select2 JS Ajax - Part 2

<br/> After complete 4 steps in our Part 1, we have to proceed next step from Part 2. In this part we write code for how to manage controller method and how to give response them. We also write code for view blade layout files. This part is hart of "Laravel 5 dynamic autocomplete search using select2 JS Ajax" article, In this part you will see the logic of database and blade template. So you have to follow this bellow remaining steps. <strong class="step">Step 5: Create Controller</strong> In this point, now we should create new controller as Select2AutocompleteController in this path <stron.....

By Hardik Savani | January 19, 2017 | | 24567 Viewer | Category : MySql
READ MORE

Laravel 5 - Dynamic Dependant Select Box using JQuery Ajax Example - Part 1

In this Tutorial, I am going to share with you how to make dynamic dependent dropdown box using Ajax like When i select category, then sub category select box value should be change. We can't do this stuff without ajax. So, in this Post i am going to give you full and very simple example of dynamic select box using change event of jquery. This article written in two parts, so it can be easy to understand and if you are beginner then also you can simply perform because this tutorial is from scratch. In this example i created two tables as listed bellow: <strong>1)countries</strong> <strong>2).....

By Hardik Savani | January 8, 2017 | | 14860 Viewer | Category : MySql
READ MORE

Laravel 5 - Dynamic Dependant Select Box using JQuery Ajax Example - Part 2

<br/> After complete our fist part of Laravel 5 - Dynamic Dependant Select Box using JQuery Ajax Example, Now we have to do main task for Dynamic select box value. In this part we follow two step for create Controller File and Laravel Blade File. In this part we write code for how to manage controller method and how to give response them. So let's follow this bellow remaining two step of change drop down options on change of parent dropdown. So let's follow: <strong class="step">Step 5: Create Controller</strong> In this point, now we should create new controller as AjaxDemoController in th.....

By Hardik Savani | January 8, 2017 | | 25317 Viewer | Category : MySql
READ MORE

    AngularJS - How to create read more/less toggle using Directive?

    AngularJS - How to create read more/less toggle using Directive?

    Open Post

    Bootstrap - Show/Hide(toggle) Password input field using bootstrap-show-password.js Plugin

    Bootstrap - Show/Hide(toggle) Password input field using bootstrap-show-password.js Plugin

    Open Post

    Codeigniter JQuery Ajax image upload example from scratch

    Codeigniter JQuery Ajax image upload example from scratch

    Open Post

    Laravel 5 - "syntax error or access violation 1055 in group by" Solved

    Laravel 5 - "syntax error or access violation 1055 in group by" Solved

    Open Post

    Ajax Image Upload using PHP and jQuery Example from scratch

    Ajax Image Upload using PHP and jQuery Example from scratch

    Open Post

    PHP - Bootstrap autocomplete tokenfield with Ajax Example

    PHP - Bootstrap autocomplete tokenfield with Ajax Example

    Open Post