Jump to content

Help with While fetch loop


kemnet

Recommended Posts

Hello, i have a query that returns multiple results but in my php query it only returns the first result...ive been checking google on while loops but still havent gotten it to work...would love if someone could look at it...thanks

//   while ($result= mysql_fetch_array($stmt)){

     while ($stmt->fetch()) {
              break;
       
         //   $stmt->close();


            
  
            // Return unlock code, encoded with JSON
            $result[] = array(
       "l_name"=>$l_name,
           "f_name"=>$f_name, 
       "birth"=>$birth,
"expires"=>$expires, 

);       
         
           
             
     

            sendResponse(200, json_encode($result));
            return true;
       
        sendResponse(400, 'Invalid request');
        return false

Link to comment
https://forums.phpfreaks.com/topic/262862-help-with-while-fetch-loop/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.