Jump to content
php.lv forumi

time() un ON UPDATE CURRENT_TIMESTAMP


aika

Recommended Posts

Pielabojiet mani, ja es kļūdos, taču man liekas ka pie šāda koda

 

	mysql_query("insert into test_table ('aa') values ( '". date("Y-m-d H:i:s", time())."')");  // bb lauks: timestamp	   	ON UPDATE CURRENT_TIMESTAMP
$result = mysql_query("select * from test_table ");
print "<br>tabulaa ierakstiits laiks:".mysql_result($result,0,"aa");
print "<br>current timestamp laiks:".mysql_result($result,0,"bb");

 

šīm vērtībām būtu jābūt vienādām:

 

tabulaa ierakstiits laiks:2009-06-13 11:20:04

current timestamp laiks:2009-06-13 11:20:53

 

hosteris apgalvo ka viņiem laiki uz abiem serveriem esot sinhronizēti! Laiks mainīt hosteri? :)

Edited by aika
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...