1 Reply Latest reply: Sep 24, 2006 10:16 AM by 807569 RSS

    mySQL: datatime?

    807569
      I've a colum in my mySQL-table of the type datatime. In PHP I use now() to create a value for this field. How can I do this in Java?
        • 1. Re: mySQL: datatime?
          807569
          I've a colum in my mySQL-table of the type datatime.
          In PHP I use now() to create a value for this field.
          How can I do this in Java?
          It depends. You could create a new Date and bind it with a PreparedStatement...

          but NOW() is a MySQL function and has nothing to do with PHP. Therefore you can use it in Java just the same because it's MySQL that does it in the end.