error
db_function.php
if ($tag == 'get_rajkot')
{
$data=$db->get_rajkot();
if($data!=false)
{
$valueresult=array();
foreach ($data as $value)
{
$valueresult=$value;
echo json_encode($valueresult);
}
}
else
{
// failed to store
$response["error"] = 1;
$response["error_msg"] = "Error occured..No get_headlines image found...";
echo json_encode($response);
}
}
结果:
在开始和结束时,它不会在两个对象和行李架public function get_rajkot()
{
$result = mysql_query("SELECT * FROM wp_term_relationships join wp_posts where ID=`object_id` and term_taxonomy_id=19 ORDER BY object_id DESC LIMIT 10") or die(mysql_error());
// check for result
$no_of_rows = mysql_num_rows($result);
if ($no_of_rows > 0)
{
$rows = array();
while($r = mysql_fetch_assoc($result))
{
$rows[] = $r;
//print_r($rows);
}
return $rows;
}
else
{
// profile not found
return false;
}
}
之间使用逗号。
答案 0 :(得分:0)
在mysql_connect查询之后设置我的sql char设置如下... 这个问题是由于古吉拉特语字体而发生的
$ con = mysql_connect($ host,$ username,$ password)或die(mysql_error()); mysql_set_charset( 'utf8mb4',$ CON);