rabn21 Posted May 2, 2007 Share Posted May 2, 2007 Hi, im having a problem with my wamp server. I have a page that loads in player objects in a list from a mysql database using php. It reads the players in fine, however when I use the part of that page to add a new player and then call the function that loads the players in it does not recognise the new player. If I close down the browser and reopen the page in a new browser window the new player loads in fine. Im thinking this is a cache problem. I have tried using a no cache query and still no luck this is driving me insane. I have included the code below. If anyone has any suggestions on how to solve this cache problem or if you think it may be a different problwm can you let me know please. Any help would be much appreciated. Here is the php code <?php $teamID = $_GET["ti"]; $con = mysql_connect("localhost","rabn21","twolves21"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("blms", $con); $result = mysql_query("SELECT SQL_NO_CACHE * FROM players"); echo "<ul>"; while($row = mysql_fetch_array($result)) { if($row['teamID'] == $teamID) { echo "<li><div class='player' id='p" . $row['playerID'] . "' onclick='javascript:getPlayerDetails(this);'>"; echo $row['fName'] . " " . $row['sName']; echo "</div></li>"; } } echo "</ul>"; mysql_close($con); ?> I hope that I have posted this in the right place. Can anyone help? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.