I am afraid that the simple script that I created to work on this page is causing more server strain than it needs:
http://www.bodybuilding.com/fun/bbinfo.php?page=Chest
Here is the script I am using to pull pieces out of the database:
<?php
if (empty($order)) {
$order = 'Order By Name';
}
mysql_connect ("SECRET", "SECRET", "SECRET");
mysql_select_db (SECRET);
$result = mysql_query ("SELECT * FROM $page $order");
if ($row = mysql_fetch_array($result)) {
do {
if ($row["Gender"] == 'Female') {
$Color = FF80C0;
} else {
$Color = FFFFFF;
}
print ("<font size=2 face=arial><font size=3><b><a href=");
print $row["Link"];
print (">");
print $row["Name"];
print ("</a></b></font><br><b>By: <font color=#");
print $Color;
print (">");
print $row["Author"];
print ("</font></b><br>");
print $row["Description"];
print (" <font size=1><i>Date Added: ");
print $row["Date"];
print ("</i></font>");
print ("<p>");
} while($row = mysql_fetch_array($result));
} else {print "<p><font size=5><b>ERROR! Contact webmaster@bodybuilding.com ASAP!</b></font>";}
?>
Is there a way to make this cause less connections and less strain on the server? There are a lot of people using this so I want to be sure it is 100% optimized before we run off and spend $10,000 on new hardware. Ugh.
Thanks for your help!
Ryan DeLuca
Bodybuilding.com