sql >> Base de Datos >  >> Database Tools >> phpMyAdmin

La cadena SQL Select no funciona

Tu consulta es incorrecta:Prueba esto

SELECT Comment1, Comment2, Comment3, Comment4 
FROM Students 
WHERE Course1 = '$value1' AND Course2 = '$value1' 
AND Course3 = '$value1' AND Course4 = '$value1'

O

SELECT Comment1, Comment2, Comment3, Comment4 
FROM Students 
WHERE Course1 = '$value1' OR Course2 = '$value1' 
OR Course3 = '$value1' OR Course4 = '$value1'

Según su requisito, use AND u OR mientras verifica el curso