WCM Forum

WCM Forum (http://www.wcm.at/forum/index.php)
-   Programmierung (http://www.wcm.at/forum/forumdisplay.php?f=17)
-   -   kleines php/mysql problem von nem anfänger (http://www.wcm.at/forum/showthread.php?t=50337)

käptn 20.03.2002 15:57

kleines php/mysql problem von nem anfänger
 
hallo leute!

folgendes problem macht bei mir nur ? im kopf!

wenn ich einträge aus meiner db lösche zählt er die ID trotzdem dort weiter wo der letzte VORM löschen war...?

wenn ich also 15-18 lösche fügt er den nächsten eintrag mit der id 19 hinzu?!

wasn da los?

käptn 20.03.2002 16:05

wenn ich schon dabei bin euch mit unnötigen fragen zuquälen....

die ganzen php-dokus ind ja ganz in ordnung...aber so einfache sachen find ich da nirgends:

muss ich die connection zur db auf jeder php-site kappen oder macht er das automatisch beim schliessen vom browser?

gibt's sowas wie ne weiterleitung a la location=...?

VIELEN DANK!&gruss

käptn 20.03.2002 16:42

sind meine fragen echt so stümperhaft, dass keiner drauf antwortet:D

ich weiss weiterleitung geht auch mit javascript, meta... aber php läuft halt am server und kratzt die browser halt net (wegen fehlender unterstützung usw.)

ad mysql_close:

z.B. um nen admin bereich zu machen wobei die conn erst bei verlassen des admin-bereichs gekaüppt wird...oder is das alles fürn hugo weils eh wurscht is?

und das mit den id's würd mich echt brennend interessieren!?

danke nochmal

gruss

_m3 20.03.2002 16:48

Ich gehe davon aus, dass Du MySQL benutzt. Aus der MySQL-Doku:
Zitat:

* An integer column may have the additional attribute AUTO_INCREMENT. When you insert a value of NULL (recommended) or 0 into an AUTO_INCREMENT column, the column is set to value+1, where value is the largest value for the column currently in the table. AUTO_INCREMENT sequences begin with 1. See section 24.1.3.126 mysql_insert_id(). If you delete the row containing the maximum value for an AUTO_INCREMENT column, the value will be reused with an ISAM, GEMINI or BDB table but not with a MyISAM or InnoDB table. If you delete all rows in the table with DELETE FROM table_name (without a WHERE) in AUTOCOMMIT mode, the sequence starts over for all table types.
ad conecction schließen:
http://at.php.net/manual/de/function.mysql-connect.php
Zitat:

Die Verbindung zum Datenbank-Server wird geschlossen, sobald die Ausführung des PHP-Skripts beendet ist oder vorher explizit die Funktion mysql_close() aufgerufen wird.
ad redirect:
http://at.php.net/manual/de/ref.http.php
header("Location: http://some.server.com");
Siehe auch 10.3 Redirection 3xx

käptn 20.03.2002 17:45

DANKE! m3

kannte at.php.net no net!

thx

dreamer 21.03.2002 20:03

Zitat:

Original geschrieben von käptn

gibt's sowas wie ne weiterleitung a la location=...?

header("Location: http://www.wcm.at");
exit;


Alle Zeitangaben in WEZ +2. Es ist jetzt 12:02 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© 2009 FSL Verlag