Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $select_services = mysqli_query($db, "SELECT * FROM orders WHERE date='2018-03-08' and user='$sess_username' order by id ASC");
- $total_ordr = mysqli_query($db, "SELECT * FROM orders WHERE user = '$sess_username' ORDER BY id ASC");
- $cek_total_ord = mysqli_num_rows($total_ordr);
- $nomor_chart = 1;
- ?>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.3.0/Chart.bundle.js"></script>
- <script type="text/javascript">
- var ctx = document.getElementById("myChart");
- var myChart = new Chart(ctx, {
- type: 'line',
- data: {
- labels: [<?php while ($b = mysqli_fetch_array($select_services)) { echo '"' . $b['date'] . '",';}?>],
- datasets: [{
- label: '# of Votes',
- data: [
- <?php while ($p = mysqli_fetch_array($total_ordr))
- {
- echo '"' . $cek_total_ord . '",';
- }?>
- ],
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement