我正在使用这个脚本,这是jpgraph本身提供的示例之一.当我把它放在一个网页(空白)上时,它正在绘制图形.但是当我将代码嵌入已经存在的网页(包含一些内容)时,它并没有绘制图形.
GD已根据phpinfo()启用.我使用jpgraph 3.5.0b1.
我在我的数据库中有几个表,并使用左外连接来连接表并执行查询.问题是,并非所有匹配的记录都被返回,第一个记录总是因某种原因从结果中被跳过.
这是SQL Fiddle的链接,
架构+测试数据:
mysql> select * from main;
+----------+------------+----------------+---------------+-------------+-------------+----------------+----------------+-----------------+------------+------------+----------------+-----------------+---------------+--------------------------+--------------+
| username | date | water_quantity | water_chilled | smoked_what | smoke_count | sleep_duration | study_duration | screen_duration | loud_level | heat_level | humidity_level | stress_physical | stress_mental | stress_notes | menstruation |
+----------+------------+----------------+---------------+-------------+-------------+----------------+----------------+-----------------+------------+------------+----------------+-----------------+---------------+--------------------------+--------------+
| test123 | 2012-09-16 | 1 | no | cigarettes | 20 | 480 | 0 | 420 | 2 | 7 | 7 | 6 | 4 | Roamed a lot on the …Run Code Online (Sandbox Code Playgroud)