phpbar.de logo

Mailinglisten-Archive

[php] Re: Select-Problem

[php] Re: Select-Problem

Carsten Lehmann php_(at)_phpcenter.de
Mon, 20 Aug 2001 17:24:16 +0200


Guenther Theilen schrieb:
> 
> Bisher hab ich folgendes:
> SELECT DISTINCT
>        MONTH(von) AS mv, YEAR(von) AS yv,
>        MONTH(bis) AS mb, YEAR(bis) AS yb
>        FROM table
> 
Wie wär's mit 
SELECT DISTINCT
        substring(von,7,1) AS sv,
        substring(bis,7,1) AS sb
        FROM table
	WHERE sv = .... and/or sb = ...
[oder 	WHERE von like ... and/or bis like ...]
	ORDER BY von [,bis]

Gruss
Carsten


php::bar PHP Wiki   -   Listenarchive