Now only one piece of data is returned. How to return all data that meets the conditions?
个人账户
个人账户 2021-01-01 11:34:32
0
1
1006

Now only one data is returned. How can I get back all the data?

if(!defined('SC')){exit('Access Denied');}

$db = functions::db();

$uid = SC('post/uid');

$wid = $db->query('pinglun','',"user='{ $uid}'");

if($wid){

$array = array(

'ret'=>true,

'id'=>$wid[0]['id'],

'zan'=>$wid[0]['zan']

);

}else{

$array = array(

); 'ret'=>false

);

}

echo json_encode($array);

个人账户
个人账户

reply all(1)
天蓬老师

Multiple pieces of data are also encapsulated into arrays, and can be returned to the front end using js or other formats

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template