update newscontent set pubdate = (select datediff(s, '1970-01-01 00:00:00', intime))我想把intime里面的时间(格式为2010-01-01 00:00:00)修改为unix时间戳并添加到pubdate里。执行的时候出现1064错误#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' intime))' at line 1MySQL 客户端版本: 5.0.51aphpMyAdmin 版本信息: 3.3.10windows服务器
解决方案 »
- [收集]mysql 无法联接故障现象及原因
- 提供思路现金奖励,超高难度数据库架构,快来挑战!
- 再请教写一个SQL语句!!
- mysql 三张表,主外键关系维护
- 对FEDRATED表执行UPDATE操作时遇到问题.向各位请教.
- 数据库表设计问题
- 我想用mysql.h头文件中的函数联接数据库,安装后却没发现mysql.h在哪里?请高手指教
- MYSQL数据丢失,查看MYD文件,内容还在,MYISAMCHK检查提示Data records:0 Deleted blocks:4218,能否恢复?
- ★★为什么我连接mysql失败?
- 启动tomcat后,只要有数据操作mysql服务就自动关闭?
- mysql 5.5里如何重命名数据库
- mysql++ API,用mysqlpp::Query,没找到query.def["xxx"],为什么?
+---------------------------------------+
| UNIX_TIMESTAMP('2010-01-01 00:00:00') |
+---------------------------------------+
| 1262275200 |
+---------------------------------------+
1 row in set (0.00 sec)
update newscontent set pubdate =datediff(s, '1970-01-01 00:00:00', intime)
set pubdate = datediff(s, '1970-01-01 00:00:00', intime)