Mysql
 sql >> Base de données >  >> RDS >> Mysql

mysql_num_rows() s'attend à ce que le paramètre 1 soit une ressource, booléen donné dans C:\wamp\www

$s=mysql_query("select semester from faculty_advisor where emp_id = 'macs410' ");
echo $s;
$subject=mysql_query("select * from subject_list where semester=$s");

Should be

$s=mysql_query("select semester from faculty_advisor where emp_id = 'macs410' ");
$row = mysql_fetch_assoc($s); 
$subject=mysql_query("select * from subject_list where semester='".$row['semester']."'");