Hasta ahora lo que mas se acerca a loque quiero ahcer es esto:
Código PHP:
$sqla = 'select * FROM reg_cursos WHERE fecha = CURDATE() AND (duracion <= NOW()) Order by folio desc';
pero incluye todos los cursos que ya terminaron sin importar que tengan 3 horas de haber pasado.
como muestro en esta tabla
Código:
+----+-------+-------------+------------+----------+----------+-------------+----------+---------+-----------+----------------------+-----------+------------+---------+------------+------------+----------+--------------+--------+---------+
| id | folio | typ_curso | fecha | horario | duracion | solicitante | programa | materia | clave_mat | nom_curso | tematica | Instructor | rec_sol | rec_utili | asistentes | semestre | ty_usuario | encues | observa |
+----+-------+-------------+------------+----------+----------+-------------+----------+---------+-----------+----------------------+-----------+------------+---------+------------+------------+----------+--------------+--------+---------+
| 70 | 291 | Instruccion | 2014-02-10 | 03:45:00 | 03:50:00 | eee | | eee | | Conoce tu BiblioTK | | | | | 0 | 0 | preparatoria | 0 | |
| 71 | 291 | Instruccion | 2014-02-10 | 03:45:00 | 03:50:00 | eee | | eee | | Conoce tu BiblioTK | | | | | 0 | 0 | preparatoria | 0 | |
| 69 | 290 | Instruccion | 2014-02-10 | 03:35:00 | 03:40:00 | SSS | | SSSS | | Conoce tu BiblioTK | | | | | 0 | 0 | preparatoria | 0 | |
| 68 | 289 | Instruccion | 2014-02-10 | 03:25:00 | 03:35:00 | SSSS | | SSS | | Conoce tu BiblioTK | | | | | 0 | 0 | preparatoria | 0 | |
| 67 | 288 | Instruccion | 2014-02-10 | 03:00:00 | 03:25:00 | aaaaa | | aaaa | | Conoce tu BiblioTK | | | | | 0 | 0 | preparatoria | 0 | |
| 65 | 286 | Instruccion | 2014-02-10 | 05:00:00 | 06:00:00 | DDDDDD | | DDDDDD | | Conoce tu BiblioTK | DDDDDDDD | | | DDDDDDDDDD | 23 | 2 | preparatoria | 0 | |
| 64 | 285 | Induccion | 2014-02-10 | 08:00:00 | 09:00:00 | NUEVO | | ICV | | ABC BiblioTK Digital | YUCÃâI | | | LIYCPI | 78 | 90 | profesores | 0 | |
+----+-------+-------------+------------+----------+----------+-------------+----------+---------+-----------+----------------------+-----------+------------+---------+------------+------------+----------+--------------+--------+---------+