Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82038

get data from table

$
0
0

I dont know get data from table. I use ajax and php for load data from mysqkdatabase. I use paginatoion and filtering too. But I domt know get data from table. I dont have any idea for variabel to use for get data from any field by click in row.

<script>
  $(document).ready(function() {
    $('#datatable').DataTable({
    ordering: false,
    searching: true,
    processing: true,
    serverSide: false,
    ajax: 'php-list-zakaznik.php',
    dataSrc: 'data',
        columns: [
                    { data: 'zak_id' },
                    { data: 'zak_nazov' },
                    { data: 'zak_ulica' },
                    { data: 'zak_mesto' },
                    { data: 'zak_icdph' },
                    { data: 'zak_tel1' },
                    { data: 'zak_tel2' },
                    { data: 'zak_email' },
                    { data: 'zak_poznamka' }
                ],

    columnDefs: [
         {
                targets: [ 0 ],
                visible: false,
                 searchable: false
          }
     ],
    });

// Click on row
    $('#datatable tbody').click( function () {
        var table =

        alert( "salary is: ");
    });
  });
</script>

How I can have data for example first hidden column ID when I click in to table row, please?
Thanks a lot.

PS: your example with otable doesnt work for me.

Or can anybody post full example for this:
- load data from MySQL database
- fucntion filtering, pagination, translating for table
- last row with button
- click on button - open dialog with form for change all values in clicked row and save button
- store all these row updated datas in to datatabase
- refresh table with new updated datas.

Thanks, thanks, thanks....


Viewing all articles
Browse latest Browse all 82038

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>