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?

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’;”
$iRowSet:=MySQL Select ($iSQLConnection;$statement)

ARRAY TEXT($aMyStuff;0)
MySQL Column To Array ($iRowSet;"contactLogin";1;$aMyStuff)
MySQL Delete Row Set ($iRowSet)

Fails.

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.

In the first section of code above, I pasted the SELECT statement into my 
Sequel Pro application and run it there without a problem. It returns the 2 
rows I expect.

Right now it’s looking like I have no way to do a query of any type on a 
date/time field. The documentation and presence of the command "MySQL Set 
DateTime In SQL” implies that it should work, but I’m failing at everything I 
can think of to try.

Ultimately, I want to do an UPDATE statement, but when that didn’t work I 
starting tying to see if a simple SELECT could work.

Anyone else have any suggestions?

Thanks,
Randy

----------------------------------------------------------------------
Randy Jaynes
Senior Programmer and Customer Support

http://printpoint.com • (845) 359-0298 • PrintPoint, Inc • 57 Ludlow Lane • 
Palisades, NY 10964 


 

**********************************************************************
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]
**********************************************************************

Reply via email to