[development] Problem with DATE_FORMAT and Module

Damian Adriel Perez Valdes damian.adriel at gmail.com
Tue Nov 23 19:50:58 UTC 2010


Hello:

I have a problem. I like to list the event for the actual day. This
it's my sql query:

SELECT *
FROM {node}
INNER JOIN {content_type_event} ON {node.vid}={content_type_event.vid}
INNER JOIN {node_revisions} ON {node.vid}={node_revisions.vid}
WHERE DATE_FORMAT( from_unixtime( content_type_event.field_fecha_value
) , "%d-%m-%Y" ) = "'.date("d-m-Y").'"

If i test this sql query in phpmyadmin, this work fine, but, if i test
this query in my drupal module this module don't work.

But this work if i delete %d

WHERE DATE_FORMAT( from_unixtime( content_type_event.field_fecha_value
) , "%d-%m-%Y" ) = "'.date("d-m-Y").'"

What can i do for this ?


More information about the development mailing list