test_om_objects: Extend objectGetEntries test

This commit is contained in:
Alexander Nicolaysen Sørnes
2008-01-23 15:10:49 +01:00
committed by Chris Morgan
parent 55d9f32c0a
commit d8c67b4740
3 changed files with 66 additions and 3 deletions

View File

@@ -327,6 +327,20 @@ class Note {
return $hResult;
}
function objectGetEntriesCount($sState)
{
$sQuery = "SELECT COUNT(DISTINCT noteId) as count FROM appNotes";
$hResult = query_parameters($sQuery);
if(!$hResult)
return false;
if(($oRow = mysql_fetch_object($hResult)))
return $oRow->count;
return false;
}
//TODO: not sure how to best let users view a table of notes
// since the note contents could be very long we would only
// want to show a small amount of the text. Implement this