ronghel Posted October 4, 2007 Report 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 Report 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
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now