Web Hosting Talk







View Full Version : Perl and MySQL question


CritticAge
07-04-2002, 02:50 AM
This might not be appropriate for web hosting forums but I think someone here might know the answer so please dont delete it.

I am making some forums in perl using a mySQL backend. I have not used any column types such as timestamp, datetime ect. So could someone how I would UPDATE and INSERT into one of those type of columns. I need it to order posts, so it needs to be date and also time. Thanks alot if you can help me with my problem.

Shyne
07-04-2002, 03:00 AM
Check the mysql manual. It has all the info u need.

CritticAge
07-04-2002, 03:14 AM
To make the question easier to understand really -
for a TIMEDATE field, would the update be:

update messageboards set lastpost = '2002-07-04 04:15:19'
OR
update messageboards set lastpost = '20020704041519'

bombino
07-04-2002, 05:05 PM
Do it in exactly the same format returned by a SELECT call.

mlovick
07-04-2002, 05:14 PM
You can use CURDATE()

CritticAge
07-05-2002, 01:49 AM
Thanks for the replies. I tryed some ways and it seems they worked. Yay for me :D