How to compare the time size of the PHPADOACCESS database and SQL statements

Source: Internet
Author: User
In the PHPADOACCESS database, how does SQL compare the time? Now we use PHP & nbsp; + & nbsp; ADO & nbsp; + & nbsp; ACCESS database to compare the Time field of ACCESS database with & nbsp; COleDateT php ado access database, how does SQL compare the time size?
Now we use PHP + ADO + ACCESS database to compare time problems

The Time field of the ACCESS database stores Time data in the COleDateTime format.
The following two lines of code write the "Time" field of the database during MFC programming:
COleDateTime ct = COleDateTime: GetCurrentTime ();
M_pRecordset_record-> PutCollect ("Time", _ variant_t (ct ));
-------------------------------------------------------
The following is the date filtering SQL statement that I want to achieve, but in fact there is a problem with writing sqlstr like this. php execution is wrong. I would like to ask how to write it correctly.
$ Sqlstr = "select * from record where NameStr = '$ sensor' and Time> '2017/15 '";
$ RsRecord1-> Open ($ sqlstr, $ conn1, 1, 1 );
------ Solution --------------------
$ Sqlstr = "select * from record where NameStr = '$ sensor' and Time >#2014-01-15 #";

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.