It's the newbie again... got another question this time regarding filesize in mysql.
Heres the scenario:
I've got a gaming site and I have people who contribute to it. Based upon several queries that are ran on one page, I want to be able to add up the FILESIZE IN KB of the results and display it at the bottom.
In all, there are 4 queries that are ran, one right after the other.
Here's an example of one:
$db = mysql_connect("xxx", "xxx", "xxx");
mysql_select_db("robsgaming",$db);
$result = mysql_query("SELECT * FROM cheats WHERE name LIKE '%$creditname%' ORDER BY system",$db);
if ($myrow = mysql_fetch_array($result)) {
echo"<font size=2><B>cheats</B>:</font><P><ol>";
do {
printf("<li><img src=\"$baseurl/images/$myrow[5]_icon.gif\"> <a href=\"%s?id=%s\">%s</a><BR>\n", $cheatbase, $myrow["id"], $myrow["gametitle"]);
} while ($myrow = mysql_fetch_array($result));
echo"</ol>"; } else {
echo "
<P>
";
}
I figure I can have the filesize added up somehow and set it equal to a variable like $FileSizeCheats then, at the very bottom of the page, add all the variables together, example: $TotFileSize = $FileSizeCheats + $FileSizePreivews, etc
How, and where, do i put the code that will deterimine the file size for each query that is ran?
Any help is appreicated. Hope I didn't make this too confusing.