Mailinglisten-Archive |
Hi Stefan,
im Prinzip geht das so:
CREATE TABLE preise (
preis int(4),
mwst int(4),
rabatt int(4)
) Type=MyISAM;
INSERT INTO preise VALUES
( 176, 16, 2),
( 75, 16, 2),
( 333, 16, 2),
(1900, 16, 2),
(4711, 16, 2);
SELECT
ROUND((preis / 100),2) AS 'prs[Eur]',
mwst AS 'MwSt[%]',
rabatt AS 'Rab[%]',
ROUND((preis * (1 - (rabatt / 100)) * (1 + (mwst / 100)) / 100),2) AS
'ges[Eur]'
FROM preise;
Bloed ist halt nur,
dass MySQL nicht kaufmaennisch rundet ...
m. b. G. Norbert
_____________________
normal: 02686-987103
Notruf: 0163-3613642
---------------------
e.o.m.
--
Infos zur Mailingliste, zur Teilnahme und zum An- und Abmelden unter
-->> http://www.4t2.com/mysql
php::bar PHP Wiki - Listenarchive