mpxplugins/serviceplugins/collectionplugins/mpxsqlitepodcastdbplugin/src/mpxdbcategory.cpp
equal
deleted
inserted
replaced
586 HBufC* query = PreProcessStringLC(KQueryCategoryGetEpisodeCount); |
586 HBufC* query = PreProcessStringLC(KQueryCategoryGetEpisodeCount); |
587 RSqlStatement recordset( |
587 RSqlStatement recordset( |
588 iDbManager.ExecuteSelectQueryL(aDriveId, *query, aId)); |
588 iDbManager.ExecuteSelectQueryL(aDriveId, *query, aId)); |
589 CleanupClosePushL(recordset); |
589 CleanupClosePushL(recordset); |
590 |
590 |
591 if (recordset.Next() != KSqlAtRow) |
591 TInt err(KSqlAtEnd); |
|
592 TInt ret(0) ; |
|
593 while((err = recordset.Next()) == KSqlAtRow) |
|
594 { |
|
595 ret += recordset.ColumnInt(KMPXTableDefaultIndex); |
|
596 } |
|
597 if(err != KSqlAtEnd) |
592 { |
598 { |
593 User::Leave(KErrNotFound); |
599 User::Leave(KErrNotFound); |
594 } |
600 } |
595 |
601 MPX_DEBUG2("CMPXDbCategory::GetEpisodeCountL Count %d" , ret); |
596 TInt ret = recordset.ColumnInt(KMPXTableDefaultIndex); |
|
597 |
|
598 CleanupStack::PopAndDestroy(&recordset); |
602 CleanupStack::PopAndDestroy(&recordset); |
599 CleanupStack::PopAndDestroy(query); |
603 CleanupStack::PopAndDestroy(query); |
600 |
604 |
601 return ret; |
605 return ret; |
602 } |
606 } |