php - MySQL中的及时更新不起作用

标签 php mysql

我正在尝试在 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/

相关文章:

php - Laravel 在命名空间中找不到类

php - 在一个字段中存储多个值

php - 如何让管理员在 laravel 中将特定类型的用户(学生)与另一种类型的用户(他们各自的导师)相匹配

mysql - 使用mysql和nodeJs更新多条记录

php - 将电子邮件分配给数组组

mysql - SQL - 计数和名称的不同值的计数和总和

PHP创建下拉菜单,插入数据库

PHPUnit 数据库测试。固定装置没有设置?

php - 尝试将数据库文件导入 phpmyadmin 时出现 "You probably tried to upload a file that is too large."(Windows 10)

mysql - 通过 yum 从 MariaDB 5.5 升级到 MariaDB 10 失败