Add/Delete/Edit button PHP/MYSQL

Add/Delete/Edit button PHP/MYSQL

AdasiaxAdasiax Posts: 2Questions: 0Answers: 0
edited June 2013 in TableTools
I've created a datatable with sorting function, but maybe someone can give me tutorial how can i add delete/edit/add buttons in my case?? because i got completely lost and confused on that page... http://code.google.com/p/jquery-datatables-editable/w/list

Here is my code :
[code]
<?php
$con = mysql_connect("localhost", "root", "");
if (!$con) {
die("Error: " . mysql_error());
}
mysql_select_db("sample", $con);
$result = mysql_query("SELECT * FROM countries");
if (!$result) { // add this check.
die('Invalid query: ' . mysql_error());
}
?>


<!DOCTYPE html>


DataTables















@import "demo_table_jui.css";
@import "jquery-ui-1.8.4.custom.css";


*{
font-family: arial;
}


$(document).ready(function(){
$('#myDataTable').dataTable({
"sPaginationType":"full_numbers",
"aaSorting":[[2, "desc"]],
"bJQueryUI":true








});
});




Name


Address


Postcode


Town


Country
Serbia
France
Italy




Add




Country
Population
Internet Users
Penetration (% Population)
World % Users



<?php
while ($row = mysql_fetch_array($result)) {
?>

<?=$row['name']?>
<?=$row['population']?>
<?=$row['internet_users']?>
<?=$row['penetration']?>
<?=$row['world_users']?>

<?php
}
?>





[/code]

Replies

  • koosvdkolkkoosvdkolk Posts: 169Questions: 0Answers: 0
    http://jquery-datatables-editable.googlecode.com/svn/trunk/index.html
  • renierdbruynrenierdbruyn Posts: 4Questions: 2Answers: 0
    is there a way to put the edit / delete buttons in the table nex to each record?
  • allanallan Posts: 63,679Questions: 1Answers: 10,498 Site admin
    With Editor sure: https://editor.datatables.net/release/DataTables/extras/Editor/examples/inlineControls.html .

    Can't say about the editable plug-in though - that's third party (and deprecated as far as I'm aware).

    Allan
This discussion has been closed.