hola a todos, aquí otra vez con un problema...
Estoy haciendo un select asì:
************************************************
$sql= "SELECT g_nombre,m_nombre,num,e_nombre FROM grupos,materias,horas,escritas WHERE (g_nombre = 'SEXTO A' AND m_nombre = 'CONTABILIDAD' AND num = 2 AND e_nombre = 'insertar' )
************************************************
Asì todo funciona; lo que necesito ahora es poner un enlace en el ultimo dato ('insertar').
*******************************
Algo asì: WHERE (g_nombre = 'SEXTO A' AND m_nombre = 'CONTABILIDAD' AND num = 2 AND e_nombre = <a href='carga.php'>insertar</a> )...
*******************************
Pero no funciona. el error es:
******************************
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'insertar ) OR (g_nombre = 'SEXTO A' AND m_nombre = 'MATE' at line 1
******************************
Si pongo el enlace en:
******************************
{ echo "<tr> <td> $row[g_nombre] </td> <td> $row[m_nombre] </td> <td> $row[num] </td> <td><a href='carga.php'>$row[e_nombre]</a> </td> </tr>";}
******************************
Funciona pero me pone los enlace en todas las filas..y yo quiero que cada fila tenga su propio enlace.
Espero de haberme explicado bien...
Gracias de antemano a todos.