check if wordpress is updating or publishing a post

I avoid the problem just checking if the ID of the post is already existing in the db.

get_post($id)==NULL

That’s probably the easiest way to do what I need.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)