$result_report = pg_query("SELECT * FROM usp_report_android_and_ios_by_appname_returnjson ('$app_submit','$year_submit','$month_submit')"); //เลขเด็ด หวยดัง,2014,SEP while ($data_report = pg_fetch_array($result_report)){ $datajson= $data_report['datajson']; //echo $datajson; } $decodejson = json_decode($datajson); $Datarow = $decodejson->Datarow; $Status = $decodejson->Status; if ($Status == TRUE){ $strTable= '<table class="data" border="1" align="center"> <tr class="data"> <th class="data" colspan="2">TimeTimeTime</th>'; for($i=1;$i<=31;$i++){ $strTable.='<th class="data" colspan = 2 >'.$i.'/'.'09'.'/'.$current_year.'</th>'; } $strTable.='</tr><tr class="data"><th class="data" colspan= 2></th>'; for($i=1;$i<=31;$i++){ $strTable.='<td class="data"><font color= orange> Android</font></td>'; $strTable.='<td class="data"><font color= #04B4AE> iOS </font></td>'; } $strTable.='</tr>'; foreach ($Datarow as $keys => $values){ $hour = (string)$values->Hourdescription; $strTable.='<tr class="data" align="center"><th class="data" colspan = 2 >'.$hour.'</th>'; $strTable.='<td class="data">'.(string)$values->Android_d1.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d1.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d2.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d2.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d3.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d3.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d4.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d4.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d5.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d5.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d6.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d6.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d7.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d7.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d8.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d8.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d9.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d9.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d10.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d10.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d11.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d11.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d12.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d12.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d13.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d13.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d14.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d14.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d15.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d15.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d16.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d16.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d17.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d17.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d18.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d18.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d19.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d19.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d20.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d20.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d21.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d21.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d22.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d22.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d23.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d23.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d24.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d24.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d25.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d25.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d26.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d26.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d27.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d27.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d28.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d28.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d29.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d29.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d30.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d30.'</td>'; $strTable.='<td class="data">'.(string)$values->Android_d31.'</td>'; $strTable.='<td class="data">'.(string)$values->iOS_d31.'</td>'.'</tr>'; } echo $strTable; } else{ echo 'status false'; } ?>
foreach ($Datarow as $keys => $values){ $sum = $sum + value }
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง