我正在尝试在 MySQL 数据库上插入日期时间。我已将该字段保留为 VARCHAR(9182)
date_default_timezone_set('Asia/Kolkata');
$timestamp = date("m/d/Y h:i:s a", time());
$utimeprocess = "UPDATE tabelconf
SET time_of_pstart = '".mysql_escape_string($timestamp)."'
WHERE UniqueID = '".mysql_escape_string($dbUniqueID)."'";
$result = mysql_query($utimeprocess);
$result 的返回值为 1
最佳答案
这意味着成功了。来自 documentation :
For other type of SQL statements, INSERT, UPDATE, DELETE, DROP, etc, mysql_query() returns TRUE on success or FALSE on error.
关于php - MySQL中的及时更新不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1857903/