Jump to content

[help] why cant update the timestamp in sql?


Turbe$Z

Recommended Posts

Posted

I have this line: 

		dbExec(connection,"UPDATE interiors SET megujitva = ? WHERE id = ?",getTimestamp(),idd)

And the funny thing is, in the same script and same function, this is works good, i get the correct date data. But when i try in another function in the same script, i get 0000-00-00 00:00:00. Why? What the difference, cause i copied exactly the same code part (which is working) to the another function, and i got only zeros!? I dont understand... how to fix this?

My Fun server:

560x95_FFFFFF_FF9900_000000_000000.png

My DD server:

n-560x95_FFFFFF_FFFFFF_000000_000000.png

Posted
9 minutes ago, WWW said:

Can you show the database structure?

You mean this?

ALTER TABLE `interiors` CHANGE `megujitva` `megujitva` TIMESTAMP(6) on update CURRENT_TIMESTAMP(6) NOT NULL DEFAULT 'current_timestamp(6)';

Sorry this is my first time using MySQL

My Fun server:

560x95_FFFFFF_FF9900_000000_000000.png

My DD server:

n-560x95_FFFFFF_FFFFFF_000000_000000.png

Posted
4 minutes ago, Turbe$Z said:

You mean this?

ALTER TABLE `interiors` CHANGE `megujitva` `megujitva` TIMESTAMP(6) on update CURRENT_TIMESTAMP(6) NOT NULL DEFAULT 'current_timestamp(6)';

Sorry this is my first time using MySQL

he means the interiors table structure like what columns and data type do you have and so on.

DBFrame Resource owner.

Posted
28 minutes ago, WWW said:
dbExec(connection,"UPDATE interiors SET megujitva = CURRENT_TIMESTAMP(6) WHERE id = ?",idd)

ahhh man, thank you so much :D

My Fun server:

560x95_FFFFFF_FF9900_000000_000000.png

My DD server:

n-560x95_FFFFFF_FFFFFF_000000_000000.png

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...