.| Autor | Beitrag |
|---|---|
|
000 22.04.2003, 16:02 scus |
Hiho, edit: sincères amitiés scus Dieser Beitrag wurde am 22.04.2003 um 16:03 von scus bearbeitet. |
|
Profil || Suche |
|
001 22.04.2003, 18:52 CN |
wenns nicht löscht leigts vielleicht an den escapeten ' (\') in line 2 -- |
|
Profil || Suche |
|
002 22.04.2003, 18:54 scus |
ohne gehts auch nicht edit: sincères amitiés scus Dieser Beitrag wurde am 22.04.2003 um 19:05 von scus bearbeitet. |
|
Profil || Suche |
|
003 23.04.2003, 02:47 Fraghunter |
scus, die beiden Sachen kannst du auch einfach mit einem einzigen Befehl machen: $query = "REPLACE INTO img_cat (dir, label, num) VALUES ('".$form_dir."', '".$form_label."', '".$i."')"; (ich glaube aber, dafür muss "dir" unique sein - kannst ja mla in der Dok schaun) --Nihil timeo, nulla re opprimor, nulli periculo cedo. |
|
Profil || Suche |
|
004 23.04.2003, 13:22 scus |
schon nur ist evtl. der eintrag noch nicht vorhanden, kann also auch nicht replaced werden. --sincères amitiés scus |
|
Profil || Suche |
|
005 23.04.2003, 13:46 CN |
dann kann er aber auch nicht gelöscht werden -- |
|
Profil || Suche |
|
006 23.04.2003, 16:35 Fraghunter |
"REPLACE works exactly like INSERT, except that if an old record in the table has the same value as a new record on a UNIQUE index or PRIMARY KEY, the old record is deleted before the new record is inserted" das macht nichts, wenn der Eintrag noch nicht vorhanden ist - das ist sogar so gedacht. --Nihil timeo, nulla re opprimor, nulli periculo cedo. |
|
Profil || Suche |
|
007 24.04.2003, 16:13 TheTinySteini |
Also sozusagen eine Mischung aus UPDATE und INSERT. --TheTinySteini |
|
Profil || Suche |
|
008 24.04.2003, 18:50 Megge |
mit select zuerst herausfinden, ob der vorhanden ist und dann eins von beidem ? -- |
|
Profil || Suche |
|
009 24.04.2003, 21:46 scus |
danke schön... sincères amitiés scus |
|
Profil || Suche |

