รายละเอียดของการตอบ ::
<script type="text/javascript">
$(document).ready(function () {
jQuery('#awesome-graph').tufteBar({
data: [
<?PHP
include "config.php";
$QueryPro=mysqli_query($mysqli,"SELECT * FROM tb_province") or die (mysqli_error());
while($ResultPro=mysqli_fetch_array($QueryPro)){
$QueryTra=mysqli_query($mysqli,"SELECT * FROM tb_traval WHERE province_id ='".$ResultPro['province_id']."'") or die (mysqli_error());
$Num_Rows=mysqli_num_rows($QueryTra);
?>
[<?=$Num_Rows?>, {label: '<?=$ResultPro['province_name']?>'}],
<?PHP } ?>
],
barWidth: 0.8,
barLabel: function(index) { return this[0] + 'x' },
axisLabel: function(index) { return this[1].label },
color: function(index) { return ['#E57536', '#82293B'][index % 2] }
});
});
</script>
mysqli ถูกไหมครับที่ใส่