php mysqli只返回一行
此代码仅返回一行,但应返回2行。我已经尝试过php myadmin中的sql,它完全返回了2行。我在这做错了什么?
$request_list_result = $mysqli->query(" SELECT buddy_requester_id, buddy_reciepient_id, user_id, user_fullname FROM sb_buddies JOIN sb_users ON buddy_requester_id=user_id WHERE buddy_status='0' AND buddy_reciepient_id='". get_uid() ."'");$request_list_row = $request_list_result->fetch_array();echo $request_list['user_fullname'];
顺便说一下,上面的代码是通过以下脚本获取profile.php的过程:
$index = new Template('views/template/one.php', array('subtitle' => 'Dashboard','stylesheets' => array('/assets/css/profile.css'),'scripts' => array('/assets/js/dashboard.js'),'sidebar' => 'sidebar.php','content' => 'views/profile.php','errors' => $errors,'successes' => $successes,'request_list' => $request_list_row //right here), true);
噜噜哒
慕田峪7331174