skill_test

query($sql);

//$result = mysql_query($sql);
$json = array();
if($result->num_rows){
while($row=$result->fetch_assoc()){
$json[‘records’][]=$row;
$pctchg=$row[‘pctChange’];
}
}
$resp=’ {
“version”: “1.0”,
“response”: {
“outputSpeech”: {
“ssml”: ” Today Apple stock percent change is $pctchg “,
“type”: “SSML”
},
“speechletResponse”: {
“outputSpeech”: {
“ssml”: ” Today Apple stock percent change is $pctchg ”
},
“shouldEndSession”: true
}
},
“sessionAttributes”: {}
} ‘;
close_db($conn);
//echo json_encode($json);
return $resp;
}

$sql = “select pctChange from sstk where tick=’AAPL'”;
$resp= jquery_db($sql);
echo $resp;
return $resp;

// please refer to our PHP JSON encode function tutorial for learning json_encode function in detail
?>

发表评论

您的邮箱地址不会被公开。 必填项已用 * 标注

4 × 2 =

季报追踪网 ERTrack.com
滚动至顶部