php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48157 Query doesnt appear until I refresh the page
Submitted: 2009-05-05 21:01 UTC Modified: 2009-05-06 13:37 UTC
From: milton at theblokgroup dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.2.9 OS: Fedora
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: milton at theblokgroup dot com
New email:
PHP Version: OS:

 

 [2009-05-05 21:01 UTC] milton at theblokgroup dot com
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'])." &raquo;</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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-06 13:37 UTC] jani@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Mar 20 14:03:56 2023 UTC