DataTables doesn't load?
DataTables doesn't load?
Hi all,
I just tried working with datatables but currently nothing works for me I can't even see anything but the table I created earlier before installing Datatables. I've also tried this using Firefox but it still doesn't work I'm posting my code below could someone let me know what I'm doing wrong?
The data entered into the table is coming from mySQL and using PHP? Does this matter or is there no PHP/MySQL support?
[code]
@import "/DataTables/media/css/demo_table.css";
$(document).ready( function () {
$('#kpi_table').dataTable();
} );
<?php include('config.php'); ?>
<?php
$db_name="mogadishu"; // Database name
$tbl_name="kpi_test_results"; // Table name
// Connect to server and select database.
mysql_select_db("$db_name")or die("cannot select DB");
$sql="SELECT * FROM $tbl_name";
$result=mysql_query($sql);
?>
KPI Database
Homepage
Test ID:
Date and Time of upload:
KPI Test ID:
Device Name:
Build:
Date of Test:
Final Outcome:
<?php
while($rows=mysql_fetch_array($result)){
?>
<?php echo $rows['id']; ?>
<?php echo $rows['timestamp']; ?>
<?php echo $rows['kpi_tests_id']; ?>
<?php echo $rows['device_name']; ?>
<?php echo $rows['build']; ?>
<?php echo $rows['datetime']; ?>
<?php echo $rows['final_outcome']; ?>
<?php
}
?>
<?php
mysql_close();
?>
[/code]
I just tried working with datatables but currently nothing works for me I can't even see anything but the table I created earlier before installing Datatables. I've also tried this using Firefox but it still doesn't work I'm posting my code below could someone let me know what I'm doing wrong?
The data entered into the table is coming from mySQL and using PHP? Does this matter or is there no PHP/MySQL support?
[code]
@import "/DataTables/media/css/demo_table.css";
$(document).ready( function () {
$('#kpi_table').dataTable();
} );
<?php include('config.php'); ?>
<?php
$db_name="mogadishu"; // Database name
$tbl_name="kpi_test_results"; // Table name
// Connect to server and select database.
mysql_select_db("$db_name")or die("cannot select DB");
$sql="SELECT * FROM $tbl_name";
$result=mysql_query($sql);
?>
KPI Database
Homepage
Test ID:
Date and Time of upload:
KPI Test ID:
Device Name:
Build:
Date of Test:
Final Outcome:
<?php
while($rows=mysql_fetch_array($result)){
?>
<?php echo $rows['id']; ?>
<?php echo $rows['timestamp']; ?>
<?php echo $rows['kpi_tests_id']; ?>
<?php echo $rows['device_name']; ?>
<?php echo $rows['build']; ?>
<?php echo $rows['datetime']; ?>
<?php echo $rows['final_outcome']; ?>
<?php
}
?>
<?php
mysql_close();
?>
[/code]
This discussion has been closed.