MySQL TimeStamp all ZEROES?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • @$operamail$.com

    MySQL TimeStamp all ZEROES?

    I have been trying to use a MySQL database with PHP having a date/time field set to timestamp(14).
    It keeps being set to a string of all zeroes (00000000000000 ). This happens evn if I use a query
    with a NULL value...

    ....the field is supposed to keep a record of modifications made to client records, so the TimeStamp
    value seemed to be the best fit.

    Is there sonmething I might be missing?

    Thanks for any help offered,

    Rick
  • Pedro Graca

    #2
    Re: MySQL TimeStamp all ZEROES?

    @$operamail$.co m wrote:[color=blue]
    > ...the field is supposed to keep a record of modifications made to client records, so the TimeStamp
    > value seemed to be the best fit.
    >
    > Is there sonmething I might be missing?[/color]

    Are you running in MAXDB mode?

    Quote from the manual ( @ http://www.mysql.com/doc/en/DATETIME.html )

    TIMESTAMP behavior when running in MAXDB mode

    When MySQL is running in MAXDB mode, TIMESTAMP behaves like
    DATETIME. No automatic updating of TIMESTAMP columns occurs,
    as described in the following paragraphs. MySQL can be run
    in MAXDB mode as of version 4.1.1. See section 5.2.1 mysqld
    Command-line Options.

    TIMESTAMP behavior when not running in MAXDB mode

    [Description of the bahavior you want]
    --
    --= my mail box only accepts =--
    --= Content-Type: text/plain =--
    --= Size below 10001 bytes =--

    Comment

    • @$operamail$.com

      #3
      Re: MySQL TimeStamp all ZEROES?

      Thanks for your reply...

      I am using a server at my college...is there a way to tell if its in MAXDB mode from my Telnet
      commandline?

      If it is I imagine that I would need to use a DATETIME data type and set it with a query parameter
      of 'time()'?

      Rick

      Pedro Graca wrote:[color=blue]
      > @$operamail$.co m wrote:
      >[color=green]
      >>...the field is supposed to keep a record of modifications made to client records, so the TimeStamp
      >>value seemed to be the best fit.
      >>
      >>Is there sonmething I might be missing?[/color]
      >
      >
      > Are you running in MAXDB mode?
      >
      > Quote from the manual ( @ http://www.mysql.com/doc/en/DATETIME.html )
      >
      > TIMESTAMP behavior when running in MAXDB mode
      >
      > When MySQL is running in MAXDB mode, TIMESTAMP behaves like
      > DATETIME. No automatic updating of TIMESTAMP columns occurs,
      > as described in the following paragraphs. MySQL can be run
      > in MAXDB mode as of version 4.1.1. See section 5.2.1 mysqld
      > Command-line Options.
      >
      > TIMESTAMP behavior when not running in MAXDB mode
      >
      > [Description of the bahavior you want][/color]

      Comment

      • Pedro Graca

        #4
        Re: MySQL TimeStamp all ZEROES?

        @$operamail$.co m top-posted [corrected]:[color=blue]
        > Pedro Graca wrote:[color=green]
        >> @$operamail$.co m wrote:
        >>[color=darkred]
        >>> ...the field is supposed to keep a record of modifications
        >>> made to client records, so the TimeStamp value seemed to
        >>> be the best fit.
        >>>
        >>>Is there sonmething I might be missing?[/color][/color][/color]
        [color=blue][color=green]
        >> Are you running in MAXDB mode?[/color][/color]
        [color=blue]
        > I am using a server at my college...is there a way to tell
        > if its in MAXDB mode from my Telnet commandline?[/color]

        perhaps
        $ mysql --version
        mysql Ver 12.22 Distrib 4.0.17, for pc-linux-gnu (i686)

        No "MAXDB" anywhere on the version ... hopefully there's an indication
        for MySQL's running in MAXDB mode :)



        Or you might want to try the COSH() function -- this doesn't work
        for me, it is only available in MAXDB mode.

        $ mysql -p -e 'select cosh(0.33)'
        Enter password:
        ERROR 1064 at line 1: 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 '(0.33)' at line 1
        [color=blue]
        > If it is I imagine that I would need to use a DATETIME data type
        > and set it with a query parameter of 'time()'?[/color]

        I can't really tell. Check http://www.mysql.com/doc/en/MaxDB.html
        --
        --= my mail box only accepts =--
        --= Content-Type: text/plain =--
        --= Size below 10001 bytes =--

        Comment

        Working...