db/lib.php
/* -----
 * Get entries from a given collection
 ----- */
Get entries from a given collection
Get entries from a given collection
function clearEntries ( $connection, $collection ) {
	try {
		$statement = $connection->prepare( 'TRUNCATE ' . $collection );
		$statement->execute();
	}
	catch ( PDOException $e ) {
		echo $e->getMessage();
		return FALSE;
	}
	return TRUE;
}
function clearEntries ( $ connection , $ collection ) { try { $ statement = $ connection -> prepare ( 'TRUNCATE ' . $ collection ) ; $ statement -> execute ( ) ; } catch ( PDOException $ e ) { echo $ e -> getMessage ( ) ; return FALSE ; } return TRUE ; }
Get entries from a given collection
Get entries from a given collection