1.20.x date_sql_handler.inc | date_sql_handler::sql_extract($extract_type, $field) |
Helper function to create cross-database SQL date extraction.
Parameters
string $extract_type: The type of value to extract from the date, like 'MONTH'.
string $field: The real table and field name, like 'tablename.fieldname'.
Return value
string: An appropriate SQL string for the db type and field type.
File
- modules/
date/ views/ date_sql_handler.inc, line 218 - SQL helper for Date API.
Class
- date_sql_handler
- A class to manipulate date SQL.
Code
function sql_extract($extract_type, $field) {
return $this->db_connection->dateExtractSql($field, $extract_type);
}