Problems inserting timestamp and having message id number :(
| From: | Sandeep Hundal | Date: | Wed, 15 Nov 2000 04:16:34 +0000 |
| Subject: | Problems inserting timestamp and having message id number :( | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-25347@lists.php.net to get a copy of this message | ||
HI everyone,
Just got two annoying problem which I couldnt find the answers to at
the site and message archives.
Firstly I want to insert a timestamp into the database and get it
back as [hours:min, date], but I firstly dont know what to put in my
MYSQL query bit which takes input from the form. Using:
$query = "INSERT into $usertable (id, timestamp, title, author, dept,
category, keywords) values
('$title','$author','$dept','$category','$keywords')";
doesnt work :( I know this really piss easy for most of you, but how
do I insert the timestamp in and get it out in the format I need?
Second thing, I want to have a forum setup so that people can reply
to articles posted (similar to slashdot). All messages posted on any
article go into one table, and it displays different messages
depending on article by using the article $id number in the URL.
There is obviously one primary key ID number anyway. But what I would
like to add is a $messageid column so that for any article, all
messages have a unique "message number" too which starts from 1
everytime. How could this be added to the table for each article????
Thanks a lot for any help or advice!
/sunny
Sunny Hundal
http://www.snooplife.com
__________________________________________________
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/