0

$dataxは数字12(出力を参照) が含まれていますが、、、などのjsonようなエントリが含まれている必要があります。 ( )1 / XXX2 / XXX$datax[] = $row['solution_id'] + " / " + $row['Type'];

エラーはどこにありますか?

<?php
include_once 'include/connect_db.php';

$query="SELECT A.solution_id, A.Type,A.Time2,B.Time1 
           FROM Table1 A 
           INNER JOIN Table2 B 
           ON A.Type=B.Type;";

$result=ejecutar_query($query);

$datax = array();
$datay1 = array();
$datay2 = array();

while($row=mysql_fetch_assoc($result)) {
    $datax[] = $row['solution_id'] + " / " + $row['Type'];
    $datay1[] = $row['Time1'];
    $datay2[] = $row['Time2'];
}

echo json_encode(array('x' => $datax, 'y1' => $datay1, 'y2' => $datay2));
die();

?>

JSON

{"x":[1,2,1,2,1,2,1,2,1,2,1,2],"y1":["2013-05-29 17:24:00"," 2013-05-29 17:24:00","2013-05-29 17:22:00","2013-05-29 17:22:00","2013-05-29 17:18:00" ,"2013-05-29 17:18:00","2013-05-29 17:16:00","2013-05-29 17:16:00","2013-05-29 17:11: 00","2013-05-29 17:11:00","2013-05-29 17:11:00","2013-05-29 17:11:00"],"y2":["2013 -05-29 17:56:26","2013-05-29 18:03:38","2013-05-29 17:48:12","2013-05-29 17:42:53", "2013-05-29 17:10:32","2013-05-29 17:52:08","2013-05-29 17:08:00","2013-05-29 17:10:18 ","2013-05-29 17:42:53","2013-05-29 17:06:12","2013-05-29 17:05:39","2013-05-29 18:09 :00"]}

4

2 に答える 2