Kleine Vragen Topic #1

Gestart doorLennard4.284 reacties15.585 weergaven

4.285 berichten · pagina 275 van 286

Marv

Lid

Berichten
3.092
Reputatie
1
Punten
0,21
Lid sinds
Laatst gezien
Trouwens, ik bedoel dan dat ik per categorie zie welke nieusberichten er dan zijn.

Dus alleen deze week ook echt de artikelen die die week geplaatst zijn, en met vorige week ook alleen de artikelen uit die week, anders krijg ik het dubbel
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Als je geen dubbele resultaten wilt moet je voor de limit dit zetten: GROUP BY id

Met je dubbelposts altijd...
0
Marv

Lid

Berichten
3.092
Reputatie
1
Punten
0,21
Lid sinds
Laatst gezien
Antonn schreef:
Als je geen dubbele resultaten wilt moet je voor de limit dit zetten: GROUP BY id

Met je dubbelposts altijd...
Browser liep vast.. zeurzak...
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Doe dan een topicreport. ...
0
Marv

Lid

Berichten
3.092
Reputatie
1
Punten
0,21
Lid sinds
Laatst gezien
Aarclay schreef:
Doe dan een topicreport. ...
Ik had het niet gezien, nog ff gepost voordat ik moest werken
0
Berichten
1.533
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik heb nu deze code, hij pakt nu alleen de dingen op deze manier:

Quote:
ding1: Dit, ding2: dat, ding3: dus;
ding1: Dit, ding2: dat, ding3: dus;

En het moet dus op alle manieren kunnen:

Quote:
ding1: Dit, ding2: dat, ding3: dus;ding1: Dit, ding2: dat, ding3: dus; ding1: Dit, ding2: dat, ding3: dus;
ding1: Dit, ding2: dat, ding3: dus;

Dit is de code:

[COLOR= #0000BB]<?php
$test[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]ding1: Dit, ding2: dat, ding3: dus; ding1: Dit, ding2: dat, ding3: dus;[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #0000BB]$data[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"n"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$test[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$data[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$value[/COLOR][COLOR= #007700]){[/COLOR]
    [URL="http://www.php.net/preg_match"]preg_match[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]~ding1: (.*?),~[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$value[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$ding1[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/preg_match"]preg_match[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]~ding2: (.*?),~[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$value[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$ding2[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/preg_match"]preg_match[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]~ding3: (.*?);~[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$value[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$ding3[/COLOR][COLOR= #007700]);[/COLOR]
    
    [COLOR= #0000BB]$dng1[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$ding1[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]];[/COLOR]
    [COLOR= #0000BB]$dng2[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$ding2[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]];[/COLOR]
    [COLOR= #0000BB]$dng3[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$ding3[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]];[/COLOR]
    
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Blablabla = [/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$dng1[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br />hoohhoi = [/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$dng2[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br />hoodfgdfg = [/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$dng3[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br /><br />[/COLOR][COLOR= #007700];
}[/COLOR]
?>
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Poedeltje schreef:
Ik heb nu deze code, hij pakt nu alleen de dingen op deze manier:

Quote:
ding1: Dit, ding2: dat, ding3: dus;
ding1: Dit, ding2: dat, ding3: dus;
En het moet dus op alle manieren kunnen:

Quote:
ding1: Dit, ding2: dat, ding3: dus;ding1: Dit, ding2: dat, ding3: dus; ding1: Dit, ding2: dat, ding3: dus;
ding1: Dit, ding2: dat, ding3: dus;

Dit is de code:

[COLOR= #0000BB]<?php
$test[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]ding1: Dit, ding2: dat, ding3: dus; ding1: Dit, ding2: dat, ding3: dus;[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #0000BB]$data[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"n"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$test[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$data[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$value[/COLOR][COLOR= #007700]){[/COLOR]
    [URL="http://www.php.net/preg_match"]preg_match[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]~ding1: (.*?),~[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$value[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$ding1[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/preg_match"]preg_match[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]~ding2: (.*?),~[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$value[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$ding2[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/preg_match"]preg_match[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]~ding3: (.*?);~[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$value[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$ding3[/COLOR][COLOR= #007700]);[/COLOR]
    
    [COLOR= #0000BB]$dng1[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$ding1[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]];[/COLOR]
    [COLOR= #0000BB]$dng2[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$ding2[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]];[/COLOR]
    [COLOR= #0000BB]$dng3[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$ding3[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]];[/COLOR]
    
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Blablabla = [/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$dng1[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br />hoohhoi = [/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$dng2[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br />hoodfgdfg = [/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$dng3[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br /><br />[/COLOR][COLOR= #007700];
}[/COLOR]
?>


Waarvoor heb je dat nodig? Want ik heb het gevoel dat je fout bezig bent en beter JSON gebruikt.
0
Berichten
1.684
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Wie heeft er interesse om met mij een Javascript en jQuery app te maken? Ik heb toch wel een redelijk grote kennis van beide.
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Poedeltje schreef:
Ik heb nu deze code, hij pakt nu alleen de dingen op deze manier:

Quote:
ding1: Dit, ding2: dat, ding3: dus;
ding1: Dit, ding2: dat, ding3: dus;
En het moet dus op alle manieren kunnen:

Quote:
ding1: Dit, ding2: dat, ding3: dus;ding1: Dit, ding2: dat, ding3: dus; ding1: Dit, ding2: dat, ding3: dus;
ding1: Dit, ding2: dat, ding3: dus;

Dit is de code:

[COLOR= #0000BB]<?php
$test[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]ding1: Dit, ding2: dat, ding3: dus; ding1: Dit, ding2: dat, ding3: dus;[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #0000BB]$data[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"n"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$test[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$data[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$value[/COLOR][COLOR= #007700]){[/COLOR]
    [URL="http://www.php.net/preg_match"]preg_match[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]~ding1: (.*?),~[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$value[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$ding1[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/preg_match"]preg_match[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]~ding2: (.*?),~[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$value[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$ding2[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/preg_match"]preg_match[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]~ding3: (.*?);~[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$value[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$ding3[/COLOR][COLOR= #007700]);[/COLOR]
    
    [COLOR= #0000BB]$dng1[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$ding1[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]];[/COLOR]
    [COLOR= #0000BB]$dng2[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$ding2[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]];[/COLOR]
    [COLOR= #0000BB]$dng3[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$ding3[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]];[/COLOR]
    
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Blablabla = [/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$dng1[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br />hoohhoi = [/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$dng2[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br />hoodfgdfg = [/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$dng3[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br /><br />[/COLOR][COLOR= #007700];
}[/COLOR]
?>


[COLOR= #0000BB]<?php

$test[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]ding1: Dit, ding2: dat, ding3: dus; ding1: Dit, ding2: dat, ding3: dus;[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #0000BB]$dingen[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000],[/COLOR] [COLOR= #0000BB]$test[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$dingen[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$ding[/COLOR][COLOR= #007700]) {[/COLOR]
   [COLOR= #FF8000]// $ding = ding1: Dit[/COLOR]

   [COLOR= #0000BB]$ander[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]: [/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$ding[/COLOR][COLOR= #007700]);[/COLOR]

   [COLOR= #0000BB]$titel[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$ander[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]];[/COLOR] [COLOR= #FF8000]// ding1[/COLOR]
   [COLOR= #0000BB]$val[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$ander[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]];[/COLOR] [COLOR= #FF8000]// Dit[/COLOR]
[COLOR= #007700]}[/COLOR]

?>
0
Berichten
3.425
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hoi,

Wie weet hoe ik een soort top 10 maak?
Ik bedoel hiermee dat de php code 10 leden uit de tabel member_accounts haalt met het hoogste aantal in de column uPosts?
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Riick schreef:
Hoi,

Wie weet hoe ik een soort top 10 maak?
Ik bedoel hiermee dat de php code 10 leden uit de tabel member_accounts haalt met het hoogste aantal in de column uPosts?
ORDER BY uPosts DESC

Dan zeg je Sorteer op uPosts van hoog naar laag
0
Berichten
6.037
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nielsie schreef:
Eerdere citaten tonen
Riick schreef:
Hoi,
Wie weet hoe ik een soort top 10 maak?
Ik bedoel hiermee dat de php code 10 leden uit de tabel member_accounts haalt met het hoogste aantal in de column uPosts?

ORDER BY uPosts DESC

Dan zeg je Sorteer op uPosts van hoog naar laag
en LIMIT 10?
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Jordyvc schreef:
Eerdere citaten tonen
Nielsie schreef:
Eerdere citaten tonen
Riick schreef:
Hoi,
Wie weet hoe ik een soort top 10 maak?
Ik bedoel hiermee dat de php code 10 leden uit de tabel member_accounts haalt met het hoogste aantal in de column uPosts?

ORDER BY uPosts DESC

Dan zeg je Sorteer op uPosts van hoog naar laag
en LIMIT 10?
Klopt, Dan zet je het limiet op 10
0
Berichten
3.425
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nielsie schreef:
Eerdere citaten tonen
Riick schreef:
Hoi,
Wie weet hoe ik een soort top 10 maak?
Ik bedoel hiermee dat de php code 10 leden uit de tabel member_accounts haalt met het hoogste aantal in de column uPosts?

ORDER BY uPosts DESC

Dan zeg je Sorteer op uPosts van hoog naar laag
Nielsie schreef:
Eerdere citaten tonen
Riick schreef:
Hoi,
Wie weet hoe ik een soort top 10 maak?
Ik bedoel hiermee dat de php code 10 leden uit de tabel member_accounts haalt met het hoogste aantal in de column uPosts?

ORDER BY uPosts DESC

Dan zeg je Sorteer op uPosts van hoog naar laag
Heb je een klein voorbeeldje voor mij?
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Bijv. SELECT [data] FROM [tabel] WHERE [condities] ORDER BY [order ding] LIMIT [limit]
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