View Issue Details

IDProjectCategoryView StatusLast Update
0006140mantisbtsqlpublic2005-09-11 08:12
Reporterjustinmarshall Assigned Tothraxisp  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.0.0rc1 
Fixed in Version1.0.0rc2 
Summary0006140: MSSQL: Ambiguous column name when trying to open Summary page
Description

The following error occurs when trying to open the Summary page:

APPLICATION ERROR 0000401
Database query failed. Error received from database was #37000: [Microsoft][ODBC SQL Server Driver][SQL Server]Ambiguous column name 'status'. for the query: SELECT status, status
FROM mantis_bug_table
WHERE project_id=1
ORDER BY status

This is occuring on MS SQL Server 2005 (CTP). Web server is IIS.
We have one test project and one test issue entered into the database.

If the above query is run with manually without the order by clause, it runs fine.

Additional Information

Line 154 in summary_page.php:

<?php summary_print_by_enum( config_get( 'status_enum_string' ), 'status' ) ?>

Starting at Line 29 in summary_api.php:

function summary_print_by_enum( $p_enum_string, $p_enum ) {
...
...
...
$query = "SELECT status, $p_enum
FROM $t_mantis_bug_table
WHERE $t_project_filter
ORDER BY $p_enum";

$result = db_query( $query );

The above sections of code together produce the statement that causes the problem.

TagsNo tags attached.

Activities

thraxisp

thraxisp

2005-08-15 15:25

reporter   ~0011213

Fixed in CVS.

core/summary_api.php -> 1.41