|
|
|
ช่วยดูหน่อยคะ json error ไม่ทราบว่าเป็นเพราะอะไรคะ ช่วยดูหน่อยนะคะ |
|
|
|
|
|
|
|
วางโค๊ดดีกว่าครับ เหมือนรูปแบบไม่ถูกต้อง
|
|
|
|
|
Date :
2013-10-22 10:48:22 |
By :
Ex-[S]i[L]e[N]t |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
นี้โค๊ดคะ
Code (PHP)
<?php
/* header("Content-type: text/html; charset=UTF-8");
header('Cache-Control: no-cache');
header('Pragma: no-cache');
header('Expires: 0');
*/ include("dbcon.php");
//$where = "";
$query=mysql_query("select * from mosque")or die(mysql_error()); //$numrow = countRec('Personalcode','province',$where);
//if($numrow>0){
$json = "";
$json .= "{";
$json .= "\"aaData\":[";
$rc = false;
while ($row = mysql_fetch_array($query)) {
if ($rc) $json .= ",";
$json .= "[";
$json .= "\"".$row['number_list']."\"";
$json .= ",\"".$row['prefix'].$row['fname_admin']." ".$row['lname_admin']."\"";
$json .= ",\"".$row['moo']."\"";
$json .= ",\"".$row['name_mosque']."\"]";
$rc = true;
}
$json .= "]";
$json .= "}";
echo $json;
//}
|
|
|
|
|
Date :
2013-10-22 11:08:36 |
By :
NToo |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|