Customized help needed to convert datatable into editor datatable

Customized help needed to convert datatable into editor datatable

nctsncts Posts: 1Questions: 0Answers: 0
edited May 2013 in Editor
I have the below code which displays the selected data properly, I need help converting this to use the editor control. Please modify my code so that the 'teamname' is able to be changed using a select box from the dataTables editor form. I will use the modified code to understand how to display and update the database table using dataTables editor. I am using this example to understand how this works and to justify purchasing datatables editor control.

[code]
<?php
$con = mysql_connect("1.2.2.3", "username", "password");
if (!$con) {
die("Error: " . mysql_error());
}
mysql_select_db("nctsdb", $con);
$result = mysql_query("
SELECT ncts_teams.teamname, ncts_agents.*
FROM nctsdb.ncts_agents ncts_agents
JOIN
nctsdb.ncts_teams ncts_teams
ON (ncts_agents.team_id = ncts_teams.team_id)
WHERE (ncts_agents.password <> '99')
");
?>
<!DOCTYPE html>


TeamEditor




@import "/jquery/datatables/media/css/jquery.dataTables_themeroller.css";
@import "http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css";


*{
font-family: arial;
}


var oTable;
$(document).ready(function(){
$("#teamsclick").click( function( e ) {
if ( $(this).hasClass('row_selected') ) {
$(this).removeClass('row_selected');
}
else {
oTable.$('tr.row_selected').removeClass('row_selected');
$(this).addClass('row_selected');
}
});
oTable = $('#teams').dataTable({
"sPaginationType":"full_numbers",
"aaSorting":[[2, "desc"]],
"bJQueryUI":true,
"iDisplayLength":40,
});
})







Username
FirstName
LastName
Team



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

<?=$row['username']?>
<?=$row['name_first']?>
<?=$row['name_last']?>
<?=$row['teamname']?>

<?php
}
?>





[/code]
This discussion has been closed.