Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 03-29-2009, 07:42 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 18,608
BMR777 is on a distinguished road
Default RE: oh dear.

One thing I recommend you do is DISABLE the featured adoptable. The method that it uses to select the featured adoptable can use some CPU resources if your site has a lot of hosted adoptables.

In functions.php find and delete:

PHP Code:
$conn mysql_connect($dbhost$dbuser$dbpass) or die ('Error connecting to mysql database!');
mysql_select_db($dbname);

$sql_query "SELECT * FROM owned_adoptables ORDER BY RAND() LIMIT 1";
$result mysql_query($sql_query);

if(
mysql_num_rows($result))
{
    while(
$row mysql_fetch_row($result))
    {
    
$id=@mysql_result($result,$i,"uid");
    
$name=@mysql_result($result,$i,"name");
    
$imageurl=@mysql_result($result,$i,"imageurl");
    
$currentlevel=@mysql_result($result,$i,"currentlevel");
    
$totalclicks=@mysql_result($result,$i,"totalclicks");
    
$owner=@mysql_result($result,$i,"owner");

    
$content "<p><img src='".$imageurl."' id='me' alt='Featured Adoptable'>
                    <strong><a href='show.php?id="
.$id."'>".$name."</a></strong><br />
                    Level: "
.$currentlevel."<br />
                    Owner: "
.$owner."<br />
                    <a href='levelup.php?id="
.$id."'>Add more HP</a></p>";


    }
}
else
{
$error "No Adoptables!";
return 
$error;

That should help save some CPU for your site. :)
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Oh Dear, I Broke My Site... Brookreed Questions and Supports 3 08-19-2013 09:43 PM


All times are GMT -5. The time now is 11:34 AM.

Currently Active Users: 2923 (0 members and 2923 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636