Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/286.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用php codeigniter的HTML图形_Php_Mysql - Fatal编程技术网

使用php codeigniter的HTML图形

使用php codeigniter的HTML图形,php,mysql,Php,Mysql,有人能帮我把html5 cnavasjs用于图形吗?图形是重复的 php代码是 window.onload = function () { var chart = new CanvasJS.Chart("chartContainer", { theme: "theme2",//theme1 animationEna

有人能帮我把html5 cnavasjs用于图形吗?图形是重复的 php代码是

window.onload = function () {
                            var chart = new CanvasJS.Chart("chartContainer", {
                                theme: "theme2",//theme1
                                animationEnabled: true,
                                 zoomEnabled:true,
                                title:{
                                    text: "Basic Column Chart Of Student in Current Year"   ,
                                    fontColor: "#0A89C4"
                               },

                                data: [              
                                {

                  // Change type to "bar", "splineArea", "area", "spline", "pie",etc.
                                    type: "column",

                                    dataPoints: [
                                         <?php foreach ($std as $row3){?>
                                    { label: "<?php echo $row3['obj_full_month'];?>", y: <?php echo count($row3['obj_student_id']);?> },

                                    <?php
                                        }
                                     ?>
                                    ]

                                }

                                ]

                            });

                            chart.render();
                        }

您是否尝试过使用Distinct:
选择Distinct obj\U full\U MOUNT,obj\U SUSTOMENT\U id FROM…
?您有3个结果。这是预期的还是像Mahmoud所说的由sql查询引起的重复?您的数据有什么问题?你想做什么?是否要消除重复数据?或者你想把它们加起来?您可能需要计算每个月的学生人数?
SELECT * FROM `obj_organisation`,`obj_student`,`obj_student_graph`
                        WHERE obj_organisation.obj_org_id = obj_student.obj_org_id
                        AND
                        obj_organisation.obj_org_id = obj_student_graph.obj_org_id
                        AND
                        obj_student.obj_student_id = obj_student_graph.obj_student_id
                        AND
                        obj_student_graph.obj_org_id = '$id'
                        AND
                        obj_student_graph.obj_year = '$year'!