ronghel Posted October 4, 2007 Share Posted October 4, 2007 $sql2 = "SELECT descriptivetitle,units,prerequisite,corequisite FROM subjects WHERE subjects.subject = '" . $row['subject'] . "'";$query2 = mysql_query($sql2); Link to comment Share on other sites More sharing options...
Synook Posted October 4, 2007 Share Posted October 4, 2007 From the SELECT at the start, we can see that query is a select statement which will return the data requested. descriptivetitle,units,prerequisite,corequisite are the columns of data it will select, while FROM subjects indicates that the data will be drawn from the subjects table. The WHERE subjects.subject = '" . $row['subject'] . "'" part is a conditional, telling the engine to only select records (rows from the table) where the subject field has the value of the variable $row['subject']. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.