-edit- Thanks everyone i figured it out with your suggestions and syntax you wrote.
This is what i am attempting to do but for the life of me i cant figure out how to write the SQL statement (sqlite until prototype is done, will switch to another SQL which i havent decided upon yet).
Solution:
command.CommandText =
"SELECT mc.date " +
"FROM media_comment AS mc "+
"LEFT JOIN media_comment AS mc2 ON mc.parentId = mc2.id AND mc2.author=@userId " +
"LEFT JOIN media AS m ON m.mediaId = mc.mediaId " +
"WHERE (mc.author=@userId AND mc.date>@date) AND(" +
"(mc.parentId == 0 AND mc.mediaId == m.mediaId AND m.userId!=@userId) OR " +
"(mc.parentId == mc2.id AND mc2.author=@userId)" +
");";
original SQL with errors and wrong syntax:
//m = media
//mc2 = media_comment but a different row
SELECT date FROM media_comment AS mc
WHERE (mc.author=@userId AND mc.date>@date)
WHERE
(mc.parentId == 0 AND mc.mediaId == m.mediaId AND m.userId!=@userId) OR
(mc.parentId == mc2.id AND mc2.author=@userId)