Mailinglisten-Archive |
Hallo,
1. Sorry wg. OT
2.
wie kann ich mySQL-Querys mit IF/ELSE verschachteln?
tabelle(Dokument,Date,Anzahl)
Ich brauche sowas wie :
IF(SELECT Date, Dokument FROM tabelle WHERE Date=3D'$dat' AND=
Dokument=3D'$doku')
UPDATE tabelle SET Anzahl=3D'$anz' WHERE Date=3D'$dat' AND=20
Dokument=3D'$doku'
ELSE
INSERT INTO tabelle (Date,Dokument,Anzahl) VALUES=20
('$dat','$doku','$anz')
Oder muss man's doch mit getrennt behandel und erst das Ergebnis der SELECT=
=20
auswerten um dann entsprechend reagieren zu k=F6nnen?
Thx & MfG
------------------------------------------------------------------
Mental=B7Design=B7Factory
Agentur f=FCr Web-Design und Kommunikation
Bobby Eichholz
Construction=B7Technical Supervising
http://www.mental-defact.de
Mail: bob_(at)_mental-defact.de
Mobil: 0171/93 44 212
Fon: 030/69 51 82 11
Fax: 030/69 51 82 16
------------------------------------------------------------------
php::bar PHP Wiki - Listenarchive