function visitors_date_format_sql in Visitors 8.2
Same name and namespace in other branches
- 8 visitors.module \visitors_date_format_sql()
- 7.2 visitors.module \visitors_date_format_sql()
- 7 visitors.module \visitors_date_format_sql()
- 7.0 visitors.module \visitors_date_format_sql()
Set date format for sql query.
Parameters
$field_name string field name:
$format string date format:
Return value
string date format
4 calls to visitors_date_format_sql()
- DaysOfMonth::_getData in src/
Controller/ Report/ DaysOfMonth.php - Returns a table content.
- DaysOfWeek::_getData in src/
Controller/ Report/ DaysOfWeek.php - Returns a table content.
- Hours::_getData in src/
Controller/ Report/ Hours.php - Returns a table content.
- MonthlyHistory::_getData in src/
Controller/ Report/ MonthlyHistory.php - Returns a table content.
File
- ./
visitors.module, line 84 - Logs visitors for your site.
Code
function visitors_date_format_sql($field_name, $format) {
switch (Database::getConnection()
->driver()) {
case 'pgsql':
return visitors_pgsql_date_format_sql($field_name, $format);
break;
case 'sqlite':
return visitors_sqlite_date_format_sql($field_name, $format);
break;
default:
return visitors_mysql_date_format_sql($field_name, $format);
}
}