Jump to content


Photo

How to make a timestamp


  • Please log in to reply
3 replies to this topic

#1 RTS

RTS
  • Members
  • PipPipPip
  • Advanced Member
  • 66 posts

Posted 19 August 2006 - 04:32 AM

I dont get how I can make a timestamp so when I submit a form with text, the time goes next to it in the database. can someone tell me how?

#2 Woolf

Woolf
  • Members
  • PipPipPip
  • Advanced Member
  • 41 posts

Posted 19 August 2006 - 04:38 AM

You can do it directly in the mysql table, I do believe, however, I do not use that... since I use my own time formatting script. What I do, is add a column to the table (such as 'time'), and then for each database insert, I put the current time in for the value (e.g.... time());

#3 RTS

RTS
  • Members
  • PipPipPip
  • Advanced Member
  • 66 posts

Posted 19 August 2006 - 05:12 AM

I get this error
Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ': August 18, 2006, 10:11 pm)' at line 1
what does this mean, and what should I do? I have the type set to "date", and the name as "time".

#4 corbin

corbin
  • Staff Alumni
  • Advanced Member
  • 8,129 posts

Posted 19 August 2006 - 06:29 AM

Ummm i think your query is structured wrong... Can you post some code?
Why doesn't anyone ever say hi, hey, or whad up world?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users