Article View: be.comp.programming
Article #2646Re: [PHP & MySQL] : Aantal random rijen uit tabel
From: Mike!
Date: Wed, 07 Apr 2004 13:05
Date: Wed, 07 Apr 2004 13:05
13 lines
1657 bytes
1657 bytes
EM wrote: > Of moet dit in PHP gebeuren. Kun je uit een array (met resultaat van > query) met een functie 3 willekeurige rijen halen. Of moet ik 3 keer een > willekeurige rij uit het resultaat van de query halen en bijhouden welke > ik al heb ? Hoe controleer je of een waarde al in een array zit ? kan... maar is makkelijker met mysql select * from table order by rand() limit 3 Mike
Technical Details
Message-ID:
<c50ub4$kup$1@netlx020.civ.utwente.nl>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!news2.telebyte.nl!humbolt.nl.linux.org!news.nl.linux.org!news.utwente.nl!not-for-mailReferences:
<c50q8a$d69$1@news.worldonline.be>Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit X-Google-Thread: 107324,894d2dc1adb18927 X-Google-Attributes: gid107324,public X-Google-Thread: 106397,894d2dc1adb18927 X-Google-Attributes: gid106397,public X-Google-Thread: fcea4,894d2dc1adb18927 X-Google-Attributes: gidfcea4,public X-Google-ArrivalTime: 2004-04-07 06:05:40 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!news2.telebyte.nl!humbolt.nl.linux.org!news.nl.linux.org!news.utwente.nl!not-for-mail From: Mike! <mike@borft.student.utwente.nl> Newsgroups: be.comp.programming,nl.comp.os.linux.programmeren,nl.comp.programmeren Subject: Re: [PHP & MySQL] : Aantal random rijen uit tabel Followup-To: be.comp.programming Date: Wed, 07 Apr 2004 15:05:38 +0200 Organization: Ninja ISD Lines: 13 Sender: s9807845@@utwente.nl Message-ID: <c50ub4$kup$1@netlx020.civ.utwente.nl> References: <c50q8a$d69$1@news.worldonline.be> NNTP-Posting-Host: cc10618-a.ensch1.ov.home.nl Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: netlx020.civ.utwente.nl 1081343140 21465 212.120.126.96 (7 Apr 2004 13:05:40 GMT) X-Complaints-To: abuse@utwente.nl NNTP-Posting-Date: Wed, 7 Apr 2004 13:05:40 +0000 (UTC) User-Agent: KNode/0.7.7