echo "Passed.<br>\n"; } else { echo "Failed.<br>\n"; } //add a second entry to the database $testDonation->sqlInsert("BBB", "BBB", "BBB", "BBB", "BBB", 2, 1); //test to find entries with ISNEW value 1, should return 1 row echo "5. Database contains 2 entries, 1 has ISNEW=1, query for rows ISNEW=1 should return 0 matching row: "; $returnedRows = $testDonation->rowInfo(1); if (count($returnedRows) == 0) { echo "Passed.<br>"; } else { echo "Failed.<br>"; } //update BBB to no now have ISNEW=0 test to find any entries with value 1 $testDonation->makeOld(); echo "6. The only row containing ISNEW=1 was changed to ISNEW=0, query for rows where ISNEW=1 should return 0 rows: "; $returnedRows = $testDonation->rowInfo(1); if (count($returnedRows) == 0) { echo "Passed.<br>\n"; } else { echo "Failed.<br>\n"; } echo "7. Both entries should have ISNEW=0, query should return two rows with matching variables: "; $returnedRows = $testDonation->rowInfo(0); if (count($returnedRows) == 2) { if ($returnedRows[0][1] == 'AAA' && $returnedRows[0][6] == 3 && $returnedRows[0][8] == 0 && $returnedRows[1][1] == 'BBB' && $returnedRows[1][6] == 2 && $returnedRows[1][8] == 0) { echo "Passed<br>"; } else { echo "Failed<br>"; }