Website is sloom?

Gestart doorRobertt17 reacties102 weergaven

18 berichten · pagina 1 van 2

Robertt

Lid · Topicstarter

Berichten
1.579
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Heey,

ik ben bezig met een website maar de home pagina en cato is ERG sloom!

http://habboslash.nl/musicie/

Bij die home pagina heb ik het zogedaan SELECT `id` (enzo) dus geen * voor de selheid
Maar catogorie is zelf sloom en daar haal ik maar uit 1 ding?

Iemand idee?
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hoeveel nummers staan er in je database?
0
Robertt

Lid · Topicstarter

Berichten
1.579
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Niet zo veel bij clipjes 11 en bij cato 3

[COLOR= #0000BB]<?php[/COLOR]
 [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]catogorie[/COLOR][COLOR= #007700]])) 
 {[/COLOR]
[COLOR= #0000BB]$cat[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]catogorie[/COLOR][COLOR= #007700]];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<div style=clear: both;></div>"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<div id=box>"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<div class=header>Catogorie "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/ucfirst"]ucfirst[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$cat[/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000]"</div>"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<div class=inner>"[/COLOR][COLOR= #007700];[/COLOR]

    [COLOR= #0000BB]$sql[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT `id`, `code`  FROM clipjes WHERE categorie = $cat"[/COLOR][COLOR= #007700];[/COLOR]

    [COLOR= #0000BB]$ophalen[/COLOR] [COLOR= #007700]=[/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]


    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$ophalen[/COLOR][COLOR= #007700]) <[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR]

    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Categorie niet gevonden / Er staan nog geen filmpjes in deze catogorie!"[/COLOR][COLOR= #007700];

    }[/COLOR]
    [URL="http://www.php.net/else"]else[/URL]
    [COLOR= #007700]{[/COLOR]
    
    [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$ophalen[/COLOR][COLOR= #007700])) 
    {[/COLOR]
      [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<img src="http://i.ytimg.com/vi/[/COLOR] [COLOR= #007700].[/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]code[/COLOR][COLOR= #007700]].[/COLOR] [COLOR= #DD0000]/0.jpg" style="border-right: 1px solid #FFFFFF; float: left; height: 60px; width: 100px; " />[/COLOR][COLOR= #007700];[/COLOR]
      [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<a href="?p=clip&id=[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]">&nbsp;[/COLOR][COLOR= #007700];[/COLOR]
      [URL="http://www.php.net/echo"]echo[/URL]  getYouTube[COLOR= #007700]([/COLOR][COLOR= #DD0000][/COLOR] [COLOR= #007700].[/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]code[/COLOR][COLOR= #007700]].[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]title[/COLOR][COLOR= #007700]);[/COLOR]
      [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]</a><br />[/COLOR][COLOR= #007700];[/COLOR]
      [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br />[/COLOR][COLOR= #007700];[/COLOR]
      [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br />[/COLOR][COLOR= #007700];[/COLOR]
      [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br />[/COLOR][COLOR= #007700];[/COLOR]
      [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br />[/COLOR][COLOR= #007700];
      
}}}[/COLOR]
?>
            </div>
    </div>


Deze is ook sloom als ik de titel en plaatje laad, volgens mij is die sloom door youtube titel ding?
0
Berichten
515
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Je hoeft niet voor elke regel een echo te zetten het kan in een keer.
Dit ziet er tevens ook netter en overzichtelijker uit.

Verder haalt hij de filmpjes etc extern weg waardoor het meestal ook trager word.
0
Robertt

Lid · Topicstarter

Berichten
1.579
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Oke dankje, maar het filmje is dus de boos doener zeg jij
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik denk eerder dat die getYoutube functie de boosdoener is
0
Robertt

Lid · Topicstarter

Berichten
1.579
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ja maar op busic.be werkt die snel heb zelfde script?
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
 [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]catogorie[/COLOR][COLOR= #007700]])) 
 {[/COLOR]
[COLOR= #0000BB]$cat[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]catogorie[/COLOR][COLOR= #007700]];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<div style=clear: both;></div>"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<div id=box>"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<div class=header>Catogorie "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/ucfirst"]ucfirst[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$cat[/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000]"</div>"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<div class=inner>"[/COLOR][COLOR= #007700];[/COLOR]

    [COLOR= #0000BB]$sql[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT `id`, `code`  FROM clipjes WHERE categorie = $cat"[/COLOR][COLOR= #007700];[/COLOR]

    [COLOR= #0000BB]$ophalen[/COLOR] [COLOR= #007700]=[/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]


    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$ophalen[/COLOR][COLOR= #007700]) <[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR]

    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Categorie niet gevonden / Er staan nog geen filmpjes in deze catogorie!"[/COLOR][COLOR= #007700];

    }[/COLOR]
    [URL="http://www.php.net/else"]else[/URL]
    [COLOR= #007700]{[/COLOR]
    
    [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$ophalen[/COLOR][COLOR= #007700])) 
    {[/COLOR]
      [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<img src="http://i.ytimg.com/vi/[/COLOR] [COLOR= #007700].[/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]code[/COLOR][COLOR= #007700]].[/COLOR] [COLOR= #DD0000]/0.jpg" style="border-right: 1px solid #FFFFFF; float: left; height: 60px; width: 100px; " />[/COLOR][COLOR= #007700];[/COLOR]
      [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<a href="?p=clip&id=[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]">&nbsp;[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #FF8000]//      echo  getYouTube( .$row[code]. ,title);[/COLOR]
      [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]</a><br />[/COLOR][COLOR= #007700];[/COLOR]
      [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br />[/COLOR][COLOR= #007700];[/COLOR]
      [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br />[/COLOR][COLOR= #007700];[/COLOR]
      [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br />[/COLOR][COLOR= #007700];[/COLOR]
      [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br />[/COLOR][COLOR= #007700];
      
}}}[/COLOR]
?>
            </div>
    </div>


Als je het zo doet, is ie dan nog langzaam?
0
Jort

Lid

Berichten
524
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Busic haalt waarschijnlijk de informatie maar één keer op en verwerkt die in de databases. Dat is een stuk sneller.
0
Robertt

Lid · Topicstarter

Berichten
1.579
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Luz, dot is idd sneller ja! Jort nee dit doet die niet volgens mij niet
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Crazydog schreef:
Luz, dot is idd sneller ja!
Dan licht het dus aan die getYoutube functie smile
0
Robertt

Lid · Topicstarter

Berichten
1.579
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dan gaat die er uit
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Of het ligt aan je Query, meestal als ik een fout in me query heb, dan loopt hij vast. emo
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hij zegt dat, na het verwijderen van die getYoutube functie, de pagina weer snel is dus dat ligt niet aan de query lijkt me emo
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Luukvdo schreef:
Hij zegt dat, na het verwijderen van die getYoutube functie, de pagina weer snel is dus dat ligt niet aan de query lijkt me emo
Rustig hoor, je hoeft me niet gelijk aan te vallen. Ik ben ook maar Shahiem emo
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren