Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
4d1d07fb
Commit
4d1d07fb
authored
Mar 17, 2010
by
Evan Goldenberg
Browse files
explicitly cast postgres to_date function arguments to text
Signed-off-by:
Evan Goldenberg
<
evang@catalyst.net.nz
>
parent
25626896
Changes
1
Show whitespace changes
Inline
Side-by-side
htdocs/lib/registration.php
View file @
4d1d07fb
...
...
@@ -387,7 +387,7 @@ function user_stats_table($limit, $offset) {
return
$result
;
}
$day
=
is_postgres
()
?
"to_date(t.ctime, 'YYYY-MM-DD')"
:
'DATE(t.ctime)'
;
$day
=
is_postgres
()
?
"to_date(t.ctime
::text
, 'YYYY-MM-DD')"
:
'DATE(t.ctime)'
;
$daterange
=
get_record_sql
(
"SELECT
...
...
@@ -406,7 +406,7 @@ function user_stats_table($limit, $offset) {
$dayinterval
=
is_postgres
()
?
"'1 day'"
:
'1 day'
;
$day
=
is_postgres
()
?
"to_date(ctime, 'YYYY-MM-DD')"
:
'DATE(ctime)'
;
$day
=
is_postgres
()
?
"to_date(ctime
::text
, 'YYYY-MM-DD')"
:
'DATE(ctime)'
;
$userdata
=
get_records_sql_array
(
"SELECT ctime, type, value,
$day
AS date
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment