graphicguy
-
Posts
5 -
Joined
-
Last visited
Never
Posts posted by graphicguy
-
-
Hey, I have tons of bandwith its using to many cpu resources for example this is one of them,
Sat Oct 28 06:21:15 2006: used 3.59 seconds of cpu time for HTTP Request: www.asdf.com : GET /page/count/733/ HTTP/1.0
I used $_GET alot for example,
$update = mysql_query("update users set date = CURDATE( ) where id = '$_GET[id]'");
-
My account constantly gets suspended and its because I use to many resources on the server and the problem comes from using get. What can I use to use less resources?
HTTP Request: asdf.com : GET /page/count/633/ HTTP/1.1
This is the error I am getting!
[quote]This Account Has Exceeded Its CPU Quota
Please contact this site's webmaster.
Wait a few minutes and use your browser's "Back" button or click here to try again.
--------------------------------------------------------------------------------
If you are the webmaster, your account may have exceeded for one or more of the following reasons:
Your site has used more than 20% of the cpu.
Your account has too many processes running at the same time.
Your site was consuming too many resources. This happens on occassion to very busy sites that have inefficient scripts running.
[/quote] -
Actually that did not work :(
-
Hey I want to order the results by $usertuts but im not to sure how to, here is the code can anyone help?
[code]$get = mysql_query("SELECT * from users");
while ($users = mysql_fetch_array($get)){
$result21 = mysql_query("SELECT * FROM tutorials");
$tutorials = mysql_fetch_array($result21);
$result1 = mysql_query("SELECT * FROM tutorials WHERE user = '$users[username]'");
$usertuts = mysql_num_rows($result1);
$stuts = mysql_query("select views from tutorials WHERE user = '$users[username]' ");
$views = "0";
while($c = mysql_fetch_array($stuts))
{
$views = $views+$c[views];
}
echo"
<a href=\"index.php?act=users&user=$users[username]\"><b>$users[username]</b></a> | <a href=\"$users[website]\">$users[website]</a> | <b>$usertuts</b> Resources | <b>$views</b> Total views<br/><br/>
";[/code]
thanks!
help! This Account Has Exceeded Its CPU Quota!
in PHP Coding Help
Posted
GET shouldnt be eating up your CPU. It is your PHP script that is eating up your RAM/CPU. If you are using mysql queries then that is most probably the culprit. Try and optimize your SQL Queries/database structure
It doesnt matter how many GETs you use or what ever.
[/quote]
Hey, How would I go about optimizing them to make them better?