Skip to content

Commit

Permalink
fix QgsPostgresProvider::maximumValue()
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@11904 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Nov 3, 2009
1 parent 9e229cf commit 6db0a2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/postgres/qgspostgresprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1869,13 +1869,13 @@ QVariant QgsPostgresProvider::maximumValue( int index )
if ( sqlWhereClause.isEmpty() )
{
sql = QString( "select max(%1) from %2" )
.arg( fieldExpression( fld ) )
.arg( quotedIdentifier( fld.name() ) )
.arg( mSchemaTableName );
}
else
{
sql = QString( "select max(%1) from %2 where %3" )
.arg( fieldExpression( fld ) )
.arg( quotedIdentifier( fld.name() ) )
.arg( mSchemaTableName )
.arg( sqlWhereClause );
}
Expand Down

0 comments on commit 6db0a2f

Please sign in to comment.