Ask a Question related to PHP Development, Design and Development.
-
Bruce #1
Freakin' Out - Loop with Conditions
I'm using Dreamweaver, PHP, MySQL to put together a site. Right, here's the
problem.
I've got a database full of entries (200) of which each entry fits into one
of a selection of Categories (about 10). When I "Repeat" a Category (in a
menu) they all get displayed - which is what I want, but I don't want any of
the Category names to be repeated.
For example:
apple
pear
bannana
and not:
apple
pear
apple
apple
pear
bananna
apple
pear
Does anyone know what I'm talking about?
Regards,
Bruce
Bruce Guest
-
HEEEEEEEEEEEELP NO FREAKIN SOUND IN MY FLASH AND IMDESPERATE TO HAVE IT BAAACK!!!
PLEEEZ help me... my flash animation works but the sound dusnt i have a microphone installed on my computer and in the settings it will say... -
Film loop rollovers working with tell sprite, but only if Loop is checked
on mouseWithin me cursor 280 tell sprite 40 --the sprite containing the film loop sprite(60).member = member("networkmapsbuttonroll") --swapping... -
Urgent: Repeat loop and Film loop clash!
Hi All, Scenario I have a script running in which the spelling which was typed in by the student is corrected. The alphabets are moved to... -
Help with loop inside loop and mysql queries
Hi List. I cannot see my error: I have relation tables setup. main id entity_name main_type etc etc date_in 1 test type1 x y 2003-06-02... -
Im Freakin out - pop-up menu error in DW4
hi guys, Thanks for the replies, just been reloading and upgrading my p.c and software. I think i have craked it........ ... -
Colin McKinnon #2
Re: Freakin' Out - Loop with Conditions
Bruce wrote:
SELECT DISTINCT fruit FROM stuff;> apple
> pear
> bannana
>
> and not:
>
> apple
> pear
> apple
> apple
> pear
> bananna
> apple
> pear
>
> Does anyone know what I'm talking about?
>
or
SELECT fruit, count(*) FROM stuff GROUP BY fruit
HTH
C.
Colin McKinnon Guest
-
eclipsboi #3
Re: Freakin' Out - Loop with Conditions
Another idea would be using array_unique in PHP.
[url]http://www.php.net/array_unique[/url]
On Fri, 09 Jul 2004 10:36:14 +0100, Colin McKinnon
<colin.deletethis@andthis.mms3.com> wrote:
>Bruce wrote:
>>>> apple
>> pear
>> bannana
>>
>> and not:
>>
>> apple
>> pear
>> apple
>> apple
>> pear
>> bananna
>> apple
>> pear
>>
>> Does anyone know what I'm talking about?
>>
>SELECT DISTINCT fruit FROM stuff;
>
>or
>
>SELECT fruit, count(*) FROM stuff GROUP BY fruit
>
>HTH
>
>C.eclipsboi Guest



Reply With Quote

