can't show my datatable ?
can't show my datatable ?
uniojnqoifazy
Posts: 1Questions: 0Answers: 0
hi all,
it's my code , but i can't see anything ,
anyone else know how to solve the problem ?
datatable.php
[code] <?php
$con = mysql_connect("localhost", "root", "pwd");
if (!$con) {
die("Error: " . mysql_error());
}
mysql_select_db("sample", $con);
$result = mysql_query("SELECT * FROM countries");
?>
<!DOCTYPE html>
DataTables
@import "media/css/demo_table_jui.css";
@import "media/themes/smoothness/jquery-ui-1.8.4.custom.css";
*{
font-family: arial;
}
$(document).ready(function(){
$('#datatables').dataTable({
"sPaginationType":"full_numbers",
"aaSorting":[[2, "desc"]],
"bJQueryUI":true
});
})
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]
it's my code , but i can't see anything ,
anyone else know how to solve the problem ?
datatable.php
[code] <?php
$con = mysql_connect("localhost", "root", "pwd");
if (!$con) {
die("Error: " . mysql_error());
}
mysql_select_db("sample", $con);
$result = mysql_query("SELECT * FROM countries");
?>
<!DOCTYPE html>
DataTables
@import "media/css/demo_table_jui.css";
@import "media/themes/smoothness/jquery-ui-1.8.4.custom.css";
*{
font-family: arial;
}
$(document).ready(function(){
$('#datatables').dataTable({
"sPaginationType":"full_numbers",
"aaSorting":[[2, "desc"]],
"bJQueryUI":true
});
})
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]
This discussion has been closed.