public static function destroy($record, $dbConn = NULL)
	{
		$table = Backbone::getTable(get_called_class(), $dbConn);

		if (is_null($dbConn)) {
			$dbConn = Backbone::makeDbConn();
		}

		try {
			$query = $dbConn->prepare('DELETE FROM ' . $table . ' WHERE id= ' . $record);
			$query->execute();
		} catch (PDOException $e) {
			return $e->getMessage();
		} finally {
			$dbConn = null;
		}

		$check = $query->rowCount();

		if ($check) {
			return $check;
		} else {
			throw new RecordNotFoundException;
		}
	}
public static function destroy($record, $dbConn = NULL)
	{
		$table = Backbone::getTable(get_called_class(), $dbConn);

		if (is_null($dbConn)) {
			$dbConn = Backbone::makeDbConn();
		}

		try {
			$query = $dbConn->prepare('DELETE FROM ' . $table . ' WHERE id= ' . $record);
			$query->execute();
		} catch (PDOException $e) {
			return $e->getMessage();
		} finally {
			$dbConn = null;
		}

		$check = $query->rowCount();

		if ($check) {
			return $check;
		} else {
			throw new RecordNotFoundException;
		}
	}
public static function destroy ( $ record , $ dbConn = NULL ) { $ table = Backbone :: getTable ( get_called_class ( ) , $ dbConn ) ; if ( is_null ( $ dbConn ) ) { $ dbConn = Backbone :: makeDbConn ( ) ; } try { $ query = $ dbConn -> prepare ( 'DELETE FROM ' . $ table . ' WHERE id= ' . $ record ) ; $ query -> execute ( ) ; } catch ( PDOException $ e ) { return $ e -> getMessage ( ) ; } finally { $ dbConn = null ; } $ check = $ query -> rowCount ( ) ; if ( $ check ) { return $ check ; } else { throw new RecordNotFoundException ; } }
Delete a record from the database table

@param int $record Index of record to be deleted
@return bool|string
Delete a record from the database table