joey.brunner
22-01-2003, 13:55
hi,
wisst ihr warum das datum nicht korrekt in die db geschrieben wird. dort steht nur folgendes datum bei receied drin... auch wenn ich statt $datum die mysqlfunktion now() verwende, steht nur das datum drin. der string von datum ist aber korrekt u zeigt folgendes an: 2003-01-22 14:26:40
+----+---------------------------------------------------------------+-------------+------------+-------+
| id | browser | ip | recieved | refer |
+----+---------------------------------------------------------------+-------------+------------+-------+
| 1 | Mozilla/5.0 (compatible; Konqueror/3; Linux) | 127.0.0.1 | 2003-01-22 | |
| 2 | Mozilla/5.0 (compatible; Konqueror/3; Linux) | 127.0.0.1 | 2003-01-22 | |
| 3 | Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Arcor 2.1) | 192.168.0.2 | 2003-01-22 | |
| 4 | Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Arcor 2.1) | 192.168.0.2 | 2003-01-22 | |
| 5 | Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Arcor 2.1) | 192.168.0.2 | 2003-01-22 | |
| 6 | Mozilla/5.0 (compatible; Konqueror/3; Linux) | 127.0.0.1 | 2003-01-22 | |
| 7 | Mozilla/5.0 (compatible; Konqueror/3; Linux) | 127.0.0.1 | 2003-01-22 | |
| 8 | Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Arcor 2.1) | 192.168.0.2 | 2003-01-22 | |
| 9 | Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Arcor 2.1) | 192.168.0.2 | 2003-01-22 | |
| 10 | Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Arcor 2.1) | 192.168.0.2 | 2003-01-22 | |
| 11 | Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Arcor 2.1) | 192.168.0.2 | 2003-01-22 | |
| 12 | Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Arcor 2.1) | 192.168.0.2 | 2003-01-22 | |
| 13 | Mozilla/5.0 (compatible; Konqueror/3; Linux) | 127.0.0.1 | 2003-01-22 | |
| 14 | Mozilla/5.0 (compatible; Konqueror/3; Linux) | 127.0.0.1 | 2003-01-22 | |
+----+---------------------------------------------------------------+-------------+------------+-------+
14 rows in set (0.00 sec)
hier der code:
.
.
.
$datum = date("Y-m-d H:i:s");
.
.
.
$sql_insert = "INSERT INTO stats (refer, browser, ip, recieved)
VALUES('$refer', '$HTTP_USER_AGENT', '$REMOTE_ADDR', '$datum')";
danke
joey
wisst ihr warum das datum nicht korrekt in die db geschrieben wird. dort steht nur folgendes datum bei receied drin... auch wenn ich statt $datum die mysqlfunktion now() verwende, steht nur das datum drin. der string von datum ist aber korrekt u zeigt folgendes an: 2003-01-22 14:26:40
+----+---------------------------------------------------------------+-------------+------------+-------+
| id | browser | ip | recieved | refer |
+----+---------------------------------------------------------------+-------------+------------+-------+
| 1 | Mozilla/5.0 (compatible; Konqueror/3; Linux) | 127.0.0.1 | 2003-01-22 | |
| 2 | Mozilla/5.0 (compatible; Konqueror/3; Linux) | 127.0.0.1 | 2003-01-22 | |
| 3 | Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Arcor 2.1) | 192.168.0.2 | 2003-01-22 | |
| 4 | Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Arcor 2.1) | 192.168.0.2 | 2003-01-22 | |
| 5 | Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Arcor 2.1) | 192.168.0.2 | 2003-01-22 | |
| 6 | Mozilla/5.0 (compatible; Konqueror/3; Linux) | 127.0.0.1 | 2003-01-22 | |
| 7 | Mozilla/5.0 (compatible; Konqueror/3; Linux) | 127.0.0.1 | 2003-01-22 | |
| 8 | Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Arcor 2.1) | 192.168.0.2 | 2003-01-22 | |
| 9 | Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Arcor 2.1) | 192.168.0.2 | 2003-01-22 | |
| 10 | Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Arcor 2.1) | 192.168.0.2 | 2003-01-22 | |
| 11 | Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Arcor 2.1) | 192.168.0.2 | 2003-01-22 | |
| 12 | Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Arcor 2.1) | 192.168.0.2 | 2003-01-22 | |
| 13 | Mozilla/5.0 (compatible; Konqueror/3; Linux) | 127.0.0.1 | 2003-01-22 | |
| 14 | Mozilla/5.0 (compatible; Konqueror/3; Linux) | 127.0.0.1 | 2003-01-22 | |
+----+---------------------------------------------------------------+-------------+------------+-------+
14 rows in set (0.00 sec)
hier der code:
.
.
.
$datum = date("Y-m-d H:i:s");
.
.
.
$sql_insert = "INSERT INTO stats (refer, browser, ip, recieved)
VALUES('$refer', '$HTTP_USER_AGENT', '$REMOTE_ADDR', '$datum')";
danke
joey