Hi Randy, I just noticed your email on the NUG. Maybe next time you might want to send me an email directly with your questions.
> Has anyone using the myConnect plugin from Pluggers been able to successfully > execute a SELECT or UPDATE statement doing a search on a DateTime field? Yes, many times. > I’ve tried doing a simple SELECT I build manually > $statement:="SELECT contactLogin FROM Contacts WHERE > reset_password_token_created_at<='2016-11-02 17:09:46’;” The problem is the quote at the end just before the semicolon. It is a curly quote. Change it to a normal single quote and voila it works. > I did that attempt after trying a more straightforward (I thought) sequence > of: > $iSQLStatement:=MySQL New SQL Statement ($iSQLConnection;"SELECT contactLogin > FROM Contacts WHERE reset_password_token_created_at<=?;") > MySQL Set DateTime In SQL ($iSQLStatement;1;$date;$cutTime) > $affectedRows:=MySQL Execute ($iSQLConnection;"";$iSQLStatement) > MySQL Delete SQL Statement ($iSQLStatement) > Also fails. There is a difference between “fails" and “does not give the expected result”. The query is fine. That is not the problem. But for “SELECT” statements you should use “MySQL Select” instead of “MySQL Execute”. Try that and you will see it gives the expected result. > That is how I originally started and was failing because I figured myConnect > would be taking care of these formatting issues. It does. You can obtain the SQL statement that gets executed by using "MySQL Get SQL Statement”. HTH, - Rob Laveaux -------------------------------------------------------- Pluggers Software Scholekstersingel 48 2496 MP Den Haag The Netherlands Email: [email protected] <mailto:[email protected]> Website: http://www.pluggers.nl <http://www.pluggers.nl/> -------------------------------------------------------- ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

