Management dynamic tables

Management dynamic tables

Wilmer30Wilmer30 Posts: 33Questions: 10Answers: 1

Hi,
I must load several tables dynamically, for each table I must perform Insert, update and delete, I managed to load the tables but how do I manage each table?

<?php
foreach ($lista as $key => $value) {
?>          
     <table id="<?php echo $value['id']?>" class="table table-striped table-bordered">
            <thead>
              <tr>
                <th>Id</th>
                <th>Productor</th>
                <th>Cantidad</th>
                <th>Precio</th>
                <th>Salary</th>
              </tr>
            </thead>
          </table>
<?php
}
?>

Code Javascript:

        var table = $('table.table').DataTable({
          "autoWidth": false,
          "language":
            {
              "url": "<?php echo base_url('vendors/datatables.net/i18n/Spanish.json') ?>"
            }
        });

For example:
How would I get an ajax load?
How would you define a variable separately then treat them for insert, update and delete?

This discussion has been closed.