开发者

I am executing two stored procedures but only first section is getting executed & section section returning null

$link = mysqli_connect('localhost','root','','icoachswim_sp');
if($result1 = mysqli_query($link,"call sp_SetupGroupsManageEventsGroups(".$uid.")")) {
    while($row1 = mysqli_fetch_array($result1)) {
        echo '<pre>';
        print_r($row1);
        echo '</pre>';
        array_push($array_gids,$row1['id']);
    }
 }                    

 if($result = mysqli_query($link,"call sp_SetupGroupsManageEvents('".$groupID."',".$uid.")")) {
     while($row = mysqli_fetch_array($result)) {
         echo '<开发者_运维百科pre>';
         print_r($row);
         echo '</pre>';
         array_push($arr_group_events,$row);
     }
}


mysqli_query will not execute multiple queries. Check out this answer: Multiple queries within a single mysqli_result

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜