From: milton at theblokgroup dot com
Operating system: Fedora
PHP version: 5.2.9
PHP Bug Type: MySQL related
Bug description: Query doesnt appear until I refresh the page
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
--
Edit bug report at http://bugs.php.net/?id=48157&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=48157&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=48157&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=48157&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=48157&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=48157&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=48157&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=48157&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=48157&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=48157&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=48157&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=48157&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=48157&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=48157&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=48157&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48157&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48157&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=48157&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=48157&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=48157&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=48157&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=48157&r=mysqlcfg