Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Last active February 11, 2020 03:11
Show Gist options
  • Save parzibyte/fdc72ab04a758cb6e8796d3abf75d1f6 to your computer and use it in GitHub Desktop.
Save parzibyte/fdc72ab04a758cb6e8796d3abf75d1f6 to your computer and use it in GitHub Desktop.
<?php
$idCurso = $request->get("idCurso");
$alumnos = DB::select(
"select nombre from alumnos
where id not in
(select alumnos.id
from alumnos
inner join alumno_curso
on alumnos.id = alumno_curso.id_alumno
and alumno_curso.id_curso = ?)",
[
$idCurso
]
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment