|
Hello How is made the timestamp in the table news30_story ? I try to insert news by using PHP script. Thanks. | |||
| 06:59am 22nd Sep 08 |
|
I'm not entirely sure what it is you mean. When you create a new post a timestamp is assigned to it using the PHP time() function. | |||
| 12:00pm 23rd Sep 08 | _______________ Chris - Network-13 |
|
Quote:
I've made an SQL request like that : Code:
INSERT INTO news30_story (title, story, shortstory, author, origauthor, avatar, ip, timestamp, catid, allowcomments, short, approved, id) VALUES ('Title', .... , UNIX_TIMESTAMP(), .... ) but it doesn't work properly. Try this PHP Code:
<?phpBe careful trying to manipulate the database this way as it's very easy to mess things up. Also note that when inserting a new posts you don't need to specify an ID as that field in the table is set to auto_increment and will assign an ID automatically | |||
| 07:02pm 24th Sep 08 | _______________ Chris - Network-13 Last edited by Chris at 07:03pm 24th Sep 08 |
|
Thanks ! | |||
| 07:27am 25th Sep 08 |