Skip to content

sql function and parameter (Date_format) #12

Description

@Akron99

Sorry my english :)

$result = $DB->rawQuery('SELECT DATE_FORMAT(start_date, "%Y") start_date FROM city_events WHERE start_date < ?', array('2013-04-01'));

it is not work!

$result = $DB->rawQuery('SELECT DATE_FORMAT(start_date, ?) start_date From city_events WHERE start_date < ?', array('%Y', '2013-04-01'));

$result is empty

if the where condition is "start_date > ?" (reverse relation)
it is work

$result = $DB->rawQuery('SELECT start_date From city_events WHERE start_date < ?', array('2013-04-01'));

it is work, but date is not formated

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions