| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2009-05-06 13:37 UTC] jani@php.net
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 09:00:01 2025 UTC | 
Description: ------------ Hi, I have created a basic php script that queries a mysql database and displays the information using a while loop. Sometimes, when a user visits the website page, none of the queries show up but once you refresh the page, they appear. I have modified max_connections in my.cnf, that is not the problem. I have also tried recoding it, that didn't help. Any suggestions would be great! Reproduce code: --------------- <?php $sqlrecc = mysql_query("SELECT * FROM events WHERE active = '1' AND home = '1' ORDER BY first_date ASC LIMIT 5"); while($rowrecc = mysql_fetch_assoc($sqlrecc)) { echo "<p><a href=\"viewevent.php?id=".$rowrecc['id']."\">".ucwords($rowrecc['event_name'])." »</a><br />"; echo ucwords($rowrecc['event_date'])."<br/>".ucwords($rowrecc['location'])."</p>"; } ?> Expected result: ---------------- The data should always appear. Actual result: -------------- The link to the actual page is: http://www.latinograduate.com/index.php