Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MySQL Datetime fields
Message
 
À
27/09/2007 20:34:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
01257348
Message ID:
01257360
Vues:
20
This message has been marked as the solution to the initial question of the thread.
Hi Rich,

Can be this bug or this bug.

You try upgrade MySQL Server or try convert bind parameter to date:
ldDate = DATE()
=SQLEXEC(lnHandle,"SELECT * from mytable WHERE DATE(AuditDate) = CAST(?ldDate AS ADTE)")
MartinaJ

>In a MySQL table we have a DATETIME field AuditDate.
>
>I want to pull records from that table for a specific date
>ldDate = DATE()
>=SQLEXEC(lnHandle,"SELECT * from mytable WHERE DATE(AuditDate) = ?ldDate")
>
>Unfortunately, this pulls zero records. I know there are records for this date
>ldDate = DATE()
>=SQLEXEC(lnHandle,"SELECT AuditDate,DATE(AuditDate) ddd FROM myTable")
>SELECT * FROM sqlresult WHERE TTOD(AuditDate) = ldDate ---> 171 records
>SELECT * FROM sqlresult WHERE ddd = lddate ---> 171 records
>
>Can someone give me the proper syntax for getting a MySQL datetime field using a parameter.
>
>Muchly appreciated...............Rich
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform