Jump to content


Photo

issues regarding while loop perhaps


  • Please log in to reply
2 replies to this topic

#1 blev

blev
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 19 April 2006 - 11:51 PM

When i apply LIMIT in this piece of code it does not work. can anyone tell me why????

also, when i try to replicate a similar loop below it but slightly different it does not display any results. Can anyone tell me why???

thanks!

while(list($key, $val) = each($club_score_array)) 
            {
                    $query3 = mysqli_query($conn, "SELECT * FROM event, venue WHERE event.venue = venue.venueName AND event.date <= '$mysqlTwoDays' AND event.eventID = '$key' [b]LIMIT 1[/b]") or die('Error, query 3 failed'); 
                      
                    while ($row = mysqli_fetch_array($query3))
                        {
                            echo "<table width='700'>
                               <tr>
                                 <td width='600'><span class='h2'><a class=h2link href='eventDisplay.php?eventID=".$row['eventID']."'>".$row['eventName']."</a> @ <a class=h2link href='clubnightDisplay.php?clubname=".$row['club']."'>".$row['club']."</a></span></td>
                                 <td width='100' rowspan='4' align='right'><img src='images/flyers/".$row['flyerName']."' width='50' /></td>
                               </tr>
                               <tr>        
                                 <td><span class='h2'><a class=h2link href='venueDisplay.php?venueName=".$row['venue']."'>".$row['venue']."</a></span></td>
                                </tr>
                                
                               <tr>
                                 <td><span class='h3'>".$row['time']." -> ".$row['admission']."</span></td>
                                </tr>
                               <tr>
                                 <td>".$row['lineup']." -> ".$row['details']."</td>
                                </tr>
                             </table><br />";
                        }
                        mysqli_free_result($query3);
            }
        }


#2 blev

blev
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 20 April 2006 - 11:04 AM

anyone?? :-(

#3 blev

blev
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 20 April 2006 - 11:34 PM

this is starting to hurt my head now.

why doesn't the statement like the "LIMIT". is it because it is in another while loop??

i'm stuck. any help would be gratefully appriciated. thanks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users