$uid='1';
$my_test=new TestResult($uid,1,$page,$testlist,10,"SLAVE");
if(!$my_test)
{
echo "数据库连接有问题!";
}
print_r($testlist);
foreach ($testlist as $values)
{
$ts_id[]=$values['ts_id'];
}
$ts_id_list = implode(",", $ts_id);//用,好连起来
$obj_friend_test = new friend_test();
$arr_friend_list = $obj_friend_test ->getFriendList($uid , $ts_id_list);
foreach ($testlist as $key=> $values)
{
$str_ts_id=$values['ts_id'];
$arr_ts_one = $arr_friend_list['ts'][$str_ts_id];
$All[$key][]=$values;
$All[$key][]=$arr_ts_one;
$str_ta_key=$values['ts_id']."-".$values['ta_id'];
$arr_ta_one = $arr_friend_list['ta'][$str_ta_key];
$All[$key][]=$arr_ta_one;
}
$my_test=new TestResult($uid,1,$page,$testlist,10,"SLAVE");
if(!$my_test)
{
echo "数据库连接有问题!";
}
print_r($testlist);
foreach ($testlist as $values)
{
$ts_id[]=$values['ts_id'];
}
$ts_id_list = implode(",", $ts_id);//用,好连起来
$obj_friend_test = new friend_test();
$arr_friend_list = $obj_friend_test ->getFriendList($uid , $ts_id_list);
foreach ($testlist as $key=> $values)
{
$str_ts_id=$values['ts_id'];
$arr_ts_one = $arr_friend_list['ts'][$str_ts_id];
$All[$key][]=$values;
$All[$key][]=$arr_ts_one;
$str_ta_key=$values['ts_id']."-".$values['ta_id'];
$arr_ta_one = $arr_friend_list['ta'][$str_ta_key];
$All[$key][]=$arr_ta_one;
}
作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:https://jackxiang.com/post/1184/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!
评论列表