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/qgis@11904 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Nov 3, 2009
1 parent 74bacf6 commit a8fe746
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/postgres/qgspostgresprovider.cpp
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 a8fe746

Please sign in to comment.