Okay, I have a basic map. It consists of a 3x3 grid, each cell with a town name in. When you clcik in a cell, you go to that town (the map view centers on it). The middles town (London) displays fine. The others, however, all show this message
Warning: Unknown: 1 result set(s) not freed. Use mysql_free_result to free result sets which were requested using mysql_query() in Unknown on line 0
To get a better idea of what I am saying, go here.
I think that this may be because the central town(london) was subjected to an early experiment to show the names of people on that town (its for a game). The other towns, however, have no names listed.
Here is the source code:
<?
include 'map.php';
echo "Your current location is ". $object[5]->name ."." ;
echo "You can see ". $object[5]->description ."." ;
?><BR><?
$query = "SELECT name FROM players WHERE x = ". $object[5]->x ." AND y = ". $object[5]->y ."";
$result = mysql_query($query) or die(mysql_error());
$result2 = mysql_fetch_array($result) or die(mysql_error());
$num = mysql_num_rows($result) or die(mysql_error());
$i = 1;
while ($i <= $num)
{
print_r($result[$i]);
echo $i;
echo ",";
$i += 1;
}
mysql_free_result($result);
?> <BR>
Before I go messing it all up, could this be the cause of the problem? If not, what could it be?