DataTable in php, Mysql and Ajax example by WebTuts

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello friends welcome to web toots tutorial i'm amanda diem today i am going to show you how to fetch data from database and display in table with sorting and pagination feature with the help of data table jquery plugin its uses is very simple and lemon and developer can easily implement this in their project now i'm showing you a demo here we can fish the record from database and display in the table with the help of jquery plugin and plug-in name and URL i will live in description now you can get the benefits of pagination like this and also you can sort this table by age by department by name whatever our salary and you can also search with a name like this so all benefits you can get through jquery plugin so now i'm showing you my database this my database my database name is ajax cred and table name is people you can easily see this is my table and there is such records no we need to move in pudding so now i'm going to my [Music] and netbeans coding and that means code editor so here is the whole code now I delete all the code except and a head section because in head section we need only CSS and J J's files from CDN and like you can see it so now I'd lead body body good no let's remove the all code of theta dot PHP and save it no need to just put some data so first of all we make a table that ID I'm giving example classes display cell padding our cell is passing their soul spacing 0 now we get T head open it and close it under T head we open just TR and close it under this we get pH heading and now copy the fields from database so this is name Department is salary and recorded so name Department age salary and lost finish record date I don't want to display person ID that's why I didn't copy it no you need to know our jQuery so before we start out put some jQuery code we need to get data from database so I just moved to data dot PHP file so here we code to get fetch the data from database so just open PHP tag make a connection MySQL underscore puri sorry my spell end is for connect localhost root password blank and my database name is a jackscrew edge X cred copy and paste here now dollar result is equal to nice to align the score puri pass the correction select no I provide the name of Fairfield so select name' department' department i remove extra spaces comma age and salary from a seller seller comma and record it copied gesture from table name my table name is people semicolon now I had all records to an array so I commend it add all records into an array so dollar rows is equal to array type of variable be defined and now why start the loop in dollar Rho is equal to my sequel i underscore fetch array dollar result now dresses open and close under this we need to store all records and to an area type of variable rows no equal jason underscore in quote dollar rose some color now we get the records in JSON format so you print the record so now we get back to my index dot PHP file and just start the script Jake every script so the script type is equal to text table JavaScript now close script close close now we write down some code so dollar document dot ready function so target that our table ID my example my data table ID is example so I am putting here dot data table you know college X URL all on my file name is data dot PHP there we get the record now , and dated data SRC in my example it's blank oma now need to define a column columns comma data comma name non name name as check the klitzy from database a name department age salary quartet so name department H salary and last one is recorded so put the columns no semicolon means semicolon I think I have done all the things I think now see that result localhost / data table my project name so here we see all the records like name department H salary and recorded you can also search the record yes it's working fine and you can also show that entry as per your record requirement yes it's working fine this is the simple example of data table resorting pagination and search feature in PHP at the help of jQuery plugin hope you learn from it if you like my tutorial so just like it subscribe it comment it soon I will get back with the new tutorials so now bye bye take care
Info
Channel: Web Tuts
Views: 24,992
Rating: undefined out of 5
Keywords: php, crud, mysql, jquery, hindi, tutorial, html, database, datatable, sorting, paging, pagination, searching, search data, data table php mysql jquery, server-side processing with php, datatable example, demo datatable, datatable bootstrap, datatables angular, datatable c#, datatables github, datatables alternative, datatables php
Id: 186DFIV_IDs
Channel Id: undefined
Length: 12min 44sec (764 seconds)
Published: Sun Oct 22 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.