Hallo,
Das Program ist in PHP3 geschrieben…
Ich hab meine Datenbank ausgewählt und
connected…
$db =
@mysql_pconnect(„localhost“,„root“,"");
mysql_select_db(„witze“,$db);
Jetzt will ich was reinschreiben …
und zwar $witz, $datum, $name
Du hast auch schon eine Tabelle angelegt?
z.B.
CREATE TABLE witz (id TINYINT (4) UNSIGNED ZEROFILL DEFAULT ‚0000‘ not null AUTO_INCREMENT, datum
DATETIME not null , name VARCHAR (64) not null , witz TEXT not null , PRIMARY KEY (id))
und dann eben ein
INSERT INTO witz (id,datum,name,witz) VALUES(’’,’$datum’,’$name’,’$witz’);
bei $datum musst Du aber genau auf das Format 0000-00-00 00:00:00 achten. Ich mache sowas lieber automatisch per timestamp von MySQL…
hth,
al
ach ja: Lesen bildet!
http://www.little-idiot.de/mysql/
http://www.koehntopp.de/php/