Jump to content

Recommended Posts

It means you've executed too many queries.

 

I had a host that restricted queries, and its limit was 20000. I lasted for an hour before it went down due to exceeding the query limit. :P

Edit: Forgot to mention, it should be back within an hour. The limit usually lasts an hour on most hosts. Talk to your host about it though.

everything was fine and then...

this is the code that triggered it?

global $scripturl;

echo'
<a href="http://vsk-ayc.totalh.com/index.php?page=210">RETURN TO THE START PAGE</a><br>
<TABLE class = "bordercolor" cellSpacing="1" cellPadding="1" width="100%" border="0">
<TR class ="catbg">
<TD width = "100%">Recent Race Reports:</td>
</table>';

$raceq = 	"SELECT race_table.raceID, race_table.raceDate, race_table.hostName, race_table.boatsInRace, race_table.seriesID,
	series_table.seriesName, race_screenshots_table.imageURL, race_table.approved
	FROM race_table
	LEFT JOIN series_table ON race_table.seriesID = series_table.seriesID
	LEFT JOIN race_screenshots_table ON race_table.raceID = race_screenshots_table.raceID
	ORDER BY raceID DESC;";
$result = mysql_query($raceq);

	while($row = mysql_fetch_array($result))
	{
	echo'
		<br>
		<TABLE class = "bordercolor" cellSpacing="1" cellPadding="1" width="100%" border="0">
		<TR class ="catbg">
		<TD width = "10%">Race ID:</td>
		<TD width = "10%">Date:</td>
		<TD width = "20%">Host Name:</td>
		<TD width = "10%">Boats In Race:</td>
		<TD width = "20%">Series Name:</td>
		<TD width = "25%">Image URL:</td>
		<TD width = "5%">Approved:</td>
		</table>
		<TABLE class = "bordercolor" cellSpacing="1" cellPadding="1" width="100%" border="0">
		<TR class ="catbg4">
		<TD width = "10%">' . $row['raceID'] . '</td>
		<TD width = "10%">' . $row['raceDate'] . '</td>
		<TD width = "20%">' . $row['hostName'] . '</td>
		<TD width = "10%">' . $row['boatsInRace'] . '</td>
		<TD width = "20%">' . $row['seriesName'] . '</td>
		<TD width = "25%">
		<a href="javascript:void(window.open(\'' . $row['imageURL'] .'\',\'\',\'resizable=yes,
		location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,fullscreen=no,dependent=no,width=1024,height=768\'))">
		VIEW IMAGE</a>
		</td>
		<TD width = "5%">' . $row['approved'] . '</td>
		</table>';
		while ($raceID = $row['raceID']) 
		{
			$ptsq =	"SELECT race_table.raceID , pts_table.skipperName, pts_table.position, pts_table.racePoints , 
					pts_table.ladderPoints
					FROM pts_table
					LEFT OUTER JOIN race_table ON pts_table.raceID = race_table.raceID
					WHERE race_table.raceID = '$raceID'
					GROUP BY pts_table.skipperName, race_table.raceID
					ORDER BY race_table.raceID, pts_table.racePoints DESC
					LIMIT 0 , 50;";
			$result2 = mysql_query($ptsq);
			while($row2 = mysql_fetch_array($result2))
			{
			echo'
				<TABLE class = "bordercolor" cellSpacing="1" cellPadding="1" width="95%" border="0">
				<TR class ="windowbg">
				<TD width = "40%">' . $row2['skipperName'] . '</td>
				<TD width = "20%">' . $row2['position'] . '</td>
				<TD width = "20%">' . $row2['racePoints'] . '</td>
				<TD width = "20%">' . $row2['ladderPoints'] . '</td>
				</table>';
			}
		}											
	}

everything was fine and then...

this is the code that triggered it?

global $scripturl;

echo'
<a href="http://vsk-ayc.totalh.com/index.php?page=210">RETURN TO THE START PAGE</a><br>
<TABLE class = "bordercolor" cellSpacing="1" cellPadding="1" width="100%" border="0">
<TR class ="catbg">
<TD width = "100%">Recent Race Reports:</td>
</table>';

$raceq = 	"SELECT race_table.raceID, race_table.raceDate, race_table.hostName, race_table.boatsInRace, race_table.seriesID,
	series_table.seriesName, race_screenshots_table.imageURL, race_table.approved
	FROM race_table
	LEFT JOIN series_table ON race_table.seriesID = series_table.seriesID
	LEFT JOIN race_screenshots_table ON race_table.raceID = race_screenshots_table.raceID
	ORDER BY raceID DESC;";
$result = mysql_query($raceq);

	while($row = mysql_fetch_array($result))
	{
	echo'
		<br>
		<TABLE class = "bordercolor" cellSpacing="1" cellPadding="1" width="100%" border="0">
		<TR class ="catbg">
		<TD width = "10%">Race ID:</td>
		<TD width = "10%">Date:</td>
		<TD width = "20%">Host Name:</td>
		<TD width = "10%">Boats In Race:</td>
		<TD width = "20%">Series Name:</td>
		<TD width = "25%">Image URL:</td>
		<TD width = "5%">Approved:</td>
		</table>
		<TABLE class = "bordercolor" cellSpacing="1" cellPadding="1" width="100%" border="0">
		<TR class ="catbg4">
		<TD width = "10%">' . $row['raceID'] . '</td>
		<TD width = "10%">' . $row['raceDate'] . '</td>
		<TD width = "20%">' . $row['hostName'] . '</td>
		<TD width = "10%">' . $row['boatsInRace'] . '</td>
		<TD width = "20%">' . $row['seriesName'] . '</td>
		<TD width = "25%">
		<a href="javascript:void(window.open(\'' . $row['imageURL'] .'\',\'\',\'resizable=yes,
		location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,fullscreen=no,dependent=no,width=1024,height=768\'))">
		VIEW IMAGE</a>
		</td>
		<TD width = "5%">' . $row['approved'] . '</td>
		</table>';
		while ($raceID = $row['raceID']) 
		{
			$ptsq =	"SELECT race_table.raceID , pts_table.skipperName, pts_table.position, pts_table.racePoints , 
					pts_table.ladderPoints
					FROM pts_table
					LEFT OUTER JOIN race_table ON pts_table.raceID = race_table.raceID
					WHERE race_table.raceID = '$raceID'
					GROUP BY pts_table.skipperName, race_table.raceID
					ORDER BY race_table.raceID, pts_table.racePoints DESC
					LIMIT 0 , 50;";
			$result2 = mysql_query($ptsq);
			while($row2 = mysql_fetch_array($result2))
			{
			echo'
				<TABLE class = "bordercolor" cellSpacing="1" cellPadding="1" width="95%" border="0">
				<TR class ="windowbg">
				<TD width = "40%">' . $row2['skipperName'] . '</td>
				<TD width = "20%">' . $row2['position'] . '</td>
				<TD width = "20%">' . $row2['racePoints'] . '</td>
				<TD width = "20%">' . $row2['ladderPoints'] . '</td>
				</table>';
			}
		}											
	}

What triggered it was exceeding the limit of queries your host has set. You can optimise your scripts to overall use less queries, but your only other options are upgrading with your host or finding one without a limit.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.