text: 
  SELECT
    lectures.type,
    content.ext, content.name
  
  FROM
    content
      JOIN lectures ON lectures.id = content.lecture AND lectures.deleted =0
      JOIN courses ON courses.id = lectures.course AND courses.deleted = 0
  
  WHERE
    content.id = %d
  
  GROUP BY
    content.id;