Re: [PHP] random selection from each subfolder

2006-12-21 Thread chris smith
On 12/22/06, Steven Macintyre <[EMAIL PROTECTED]> wrote: Ok ... previous problem sorted ... now onto the next ... The client wants the following; A scroll bar with 3 random thumbs from each subdirectory in the /images/ folder I was thinking ... Going into each folder, getting files, pushing i

[PHP] random selection from each subfolder

2006-12-21 Thread Steven Macintyre
Ok ... previous problem sorted ... now onto the next ... The client wants the following; A scroll bar with 3 random thumbs from each subdirectory in the /images/ folder I was thinking ... Going into each folder, getting files, pushing into an array - shuffling array, taking first three items a

Re: [PHP] Random selection

2003-08-23 Thread Jim Lucas
ED]> Sent: Saturday, August 23, 2003 6:06 AM Subject: [PHP] Random selection > Hi, > > Can you help me with this one?? > > In my mysql db i have a colum called names; > > In names their are: > > Frank > Frank > Bob > Alice > Bob > Alice > Jim > Alice

Re: [PHP] Random selection

2003-08-23 Thread fkeessen
Hi, Thanks for the answer.. I'm open for faster ways!!! >BTW, if a value appears multiple times in a database column then your >database may be a good candidate for normalisation. Problem i'm selecting some holidays out of an database but I want to avoid that there are holiday's presented from

Re: [PHP] Random selection

2003-08-23 Thread Binay Agarwal
Hi You can use "select distinct names from table_name order by rand() limit 3". Hope this helps and let me know. cheers Binay - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, August 23, 2003 6:36 PM Subject: [PHP] Random sel

Re: [PHP] Random selection

2003-08-23 Thread David Otton
On Sat, 23 Aug 2003 15:06:32 +0200 (CEST), you wrote: >In my mysql db i have a colum called names; > >In names their are: > >Frank >Frank >Bob >Alice >Bob >Alice >Jim >Alice >Frank > >I want to make a random selection (max 3 value's for example).. Only it may not >produce two times the same name.

[PHP] Random selection

2003-08-23 Thread fkeessen
Hi, Can you help me with this one?? In my mysql db i have a colum called names; In names their are: Frank Frank Bob Alice Bob Alice Jim Alice Frank I want to make a random selection (max 3 value's for example).. Only it may not produce two times the same name. For example; This is the outpu