S3Ri0US: Geschwindigkeit erhöhen ? PHP Optimieren ?

Beitrag lesen

Danke schon mal für eure Antworten...

Diese Abfragen kannst du auch per switch() und case lösen, das ist "stilvoller".....

Werde ich mir mal anschauen.

Hmm wenn das auch nichts bringt wird es wohl an der DB liegen... ich rude die Antowrten über eine  WHILE schleiffe auf... Max 10 Antowrten pro seite..

......

$antworten = "SELECT id,thread,byuser,text,datum,zeit,posttime FROM forum_antwort WHERE thread='$id' ORDER by posttime ASC LIMIT $start,$stop";
                            $erga = mysql_db_query("700fps_d",$antworten,$verbindung);
                            while (list($aid,$threadid,$auser,$atext,$adatum,$azeit,$posttime) = mysql_fetch_row($erga))
                            {
                                $whileuserabfrage = "SELECT isAllowed,posts,signatur,avatar,regdate,lastaction,session_id,isMod,isAdmin,isPayuser FROM Users WHERE name='$auser'";
                                $ergwhile = mysql_db_query("700fps_d",$whileuserabfrage,$verbindung);
                                list($a_isallowed,$a_posts,$a_signatur,$a_avatar,$a_regdate,$a_lastaction,$a_session_id,$a_isMod,$a_isAdmin,$a_isPayuser)= mysql_fetch_row($ergwhile);

$sql = "SELECT id FROM verwarnungen WHERE user='$auser'";
                                $res = mysql_query($sql);
                                $a_verwarnungen = mysql_num_rows($res);

if($a_isallowed=="1") {
                                    $a_isallowed="Nein";
                                } else {
                                    $a_isallowed="Ja";
                                }

if(!empty($a_session_id) OR $session_id != "0") {
                                    $a_ip="Nein";
                                } else {
                                    $a_ip="Ja";
                                }

if(empty($a_avatar)) {
                                    $a_avatar = "<img border="1" src='useravatars/noavatar.jpg' width="80" height="100">";
                                } else {
                                    $a_avatar = "<img border="1" src='useravatars/$a_avatar' width="80" height="100">";
                                }

$lastaY = substr($a_lastaction, 0, 4);
                                $lastaM = substr($a_lastaction, 4, 2);
                                $lastaD = substr($a_lastaction, 6, 2);
                                $a_lastaction = "$lastaD.$lastaM.$lastaY";

$rang = SetRang($a_posts);

if($a_isMod=="1") {
                                    $a_status = "Mod";
                                } else if($a_isAdmin=="1") {
                                    $a_status = "Admin";
                                } else {
                                    $a_status = "Member";
                                }

if(empty($a_signatur)) {
                                    $a_signatur = "<br>";
                                } else {
                                    $a_signatur = replaceMessage($a_signatur);
                                    $a_signatur = "<br>---<br><br>$a_signatur";
                                }