Skip to content

Commit

Permalink
Don't use reserved SQL keyword as column alias
Browse files Browse the repository at this point in the history
Using 'number' as alias for column in html_status_percentage_legend()
function causes error ORA-00923 when displaying my_view_page.php on
Oracle.

Fixes #16330
  • Loading branch information
dregad committed Oct 16, 2013
1 parent 124ad55 commit 6bb680b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/helper_api.php
Expand Up @@ -133,7 +133,7 @@ function get_percentage_by_status() {
# checking if it's a per project statistic or all projects
$t_specific_where = helper_project_specific_where( $t_project_id, $t_user_id );

$query = "SELECT status, COUNT(*) AS number
$query = "SELECT status, COUNT(*) AS num
FROM $t_mantis_bug_table
WHERE $t_specific_where";
if ( !access_has_project_level( config_get( 'private_bug_threshold' ) ) ) {
Expand All @@ -146,7 +146,7 @@ function get_percentage_by_status() {
$t_status_count_array = array();

while( $row = db_fetch_array( $result ) ) {
$t_status_count_array[$row['status']] = $row['number'];
$t_status_count_array[$row['status']] = $row['num'];
}
$t_bug_count = array_sum( $t_status_count_array );
foreach( $t_status_count_array AS $t_status=>$t_value ) {
Expand Down

0 comments on commit 6bb680b

Please sign in to comment.