[x] Navigation

[x] Wer ist wo
 Bots:
1: Google > Forum 9.x
2: Majestic-12 > Forum 9.x
 Visitors:
1: Forum 9.x

[x] Languages

[x] Design
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.

[x] Downloads (Top)

Hilfe bei PHP Code

Author Message
Highlander
Investigator


Joined: Apr 30, 2005
Posts: 18

PostPost subject: Hilfe bei PHP Code
Posted: 04.08.2005 19:50
Reply with quote

Hallo zusammen. Kann mir jemand bei diesem Code helfen, es erfolgt keine Ausgabe, zumindest er zeigt nichts an. Ich finde einfach den Fehler nicht.

Array:
$result = $db ->sql_query("select lid, title, hits from ".$prefix."_downloads_downloads", $db);

while(list($lid, $title, $hits) = $db ->sql_fetchrow($result, $db)) {
   $title2 = ereg_replace("_", " ", $title);
$a = 1;
$total_hits = $total_hits + $hits;
$a++;
}
$result = $db ->sql_query("select * from $prefix'._downloads_downloads.'", $db);
    $numrows = $db ->sql_numrows($result, $db);
    $result=$db ->sql_query("select sum(filesize*hits) as serv from $prefix'._downloads_downloads.'", $db);
    while(list($serv) = $db ->sql_fetchrow($result, $db)) {
        $served = $serv;
    }
    $gb = 1024*1024*1024;
    $mb = 1024*1024;
    $kb = 1024;
    if ($served >= $gb){
        $mysizes = sprintf ("%01.2f",$served/$gb) . " GB ";
    } elseif ($served >= $mb) {
        $mysizes = sprintf ("%01.2f",$served/$mb) . " Mb ";
    } elseif ($served >= $kb) {
        $mysizes = sprintf ("%01.2f",$served/$kb) . " Kb ";
    } else{
        $mysizes = $served . " B ";
    }
	
	$dresult = mysql_query("select hits from $prefix'._downloads_downloads.'" );
while(list($hits) = mysql_fetch_row($dresult)){
		$d+= $hits;
		}
         $jresult = mysql_query("select filesize from $prefix'._downloads_downloads.'" );
    while(list($filesize) = mysql_fetch_row($jresult)){
  $j+= $filesize;
		}
		 $gb = 1024*1024*1024;
         $mb = 1024*1024;
		 if ($served >= $gb){
    $m = sprintf ("%01.2f",$j/$gb) . " GB";
	} elseif ($served >= $mb) {
    $m = sprintf ("%01.2f",$j/$mb) . " MB";}

Besten Dank


[Moderatoren]: Highlander trage unter Profil >> Sonstiges deine Serverdaten ein! Crying or Very sad
Back to top
View user's profile
Highlander
Investigator


Joined: Apr 30, 2005
Posts: 18

PostPost subject: Re: Hilfe bei PHP Code
Posted: 07.08.2005 20:12
Reply with quote

Niemand eine Idee warum man keine Ausgabe bekommt?

[Moderatoren]: Highlander trage unter Profil >> Sonstiges deine Serverdaten ein! Crying or Very sad
Back to top
View user's profile
Ertan
Webmaster


Joined: Mar 19, 2004
Posts: 1247
Location: Germany

PostPost subject: Re: Hilfe bei PHP Code
Posted: 08.08.2005 10:48
Reply with quote

was wird nicht angezeigt?

ist unübersichtlich !

_________________
.: USE THE FORCE :.
Helft mit ! Keine Unbeantworteten Beiträge mehr

Ertan's Serverdaten - verwendete Vers. (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Send e-mail Visit poster's website Photo Gallery
Highlander
Investigator


Joined: Apr 30, 2005
Posts: 18

PostPost subject: Re: Hilfe bei PHP Code
Posted: 11.08.2005 19:11
Reply with quote

Hier das komplette Skript, die Ausgabe (ganz unten) "$totalfiles" und "$totalcategories" funktionieren, nur die letzten 3 wo die Größe der Datenbank ausgegeben werden soll klappen irgendwie nicht.

PHP:


[Moderatoren]: Highlander trage unter Profil >> Sonstiges deine Serverdaten ein! Crying or Very sad
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic   Printer Friendly Page    Forum Index > > Installation & Upgrades 9.x
Page 1 of 1
All times are GMT + 1 Hour



Jump to:  


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum




Interactive software released under GNU GPL, Code Credits, Privacy Policy