$condition_session = " AND (id_session = '$current_session_id' OR (id_session = '0' AND insert_date <= (SELECT creation_date FROM $TABLE_COURSE WHERE code = '{$_course[id]}')))";
$sql = "SELECT *
$condition_session = " AND (id_session = '$current_session_id' OR id_session = '0')";