您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

PHP ADO ACCESS数据库,SQL如何比较时间大小

2025/1/4 4:06:36发布15次查看
php ado access数据库,sql怎么比较时间大小?
现在用php + ado + access数据库,比较时间遇到问题
access数据库的time字段存储的为 coledatetime格式的时间数据。
下面二行代码为mfc 编程时写入数据库的“time”字段的代码
coledatetime ct=coledatetime::getcurrenttime();
m_precordset_record->putcollect(time,_variant_t(ct));
-------------------------------------------------------
下面是我想达到的日期筛选sql,但实际上sqlstr这样写是有问题的,php执行错误的,想请教一下怎样写才是正确的。
$sqlstr=select * from record where namestr='$sensor' and time>'2014/01/15';
$rsrecord1->open($sqlstr,$conn1,1,1);
------解决方案--------------------
$sqlstr=select * from record where namestr='$sensor' and time>#2014-01-15#;
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product