Linux web host - Try It Out Joining Two Tables In this
Try It Out Joining Two Tables In this exercise, you ll link the two tables with a JOIN. 1. Make the following highlighted changes to select2.php: 1990 . ORDER BY movie_type ; $results = mysql_query($query) or die(mysql_error()); echo
| n ; echo $value; echo |
n ; ?> 2. Save the script and run it. How It Works You should see the same result as in the previous example. As you can see, you simply listed all the fields you wanted to see, regardless of the table they were in. (MySQL will find them as long as the table name is referenced there somewhere.) You did this in the first line of the SELECT statement: SELECT movie_name, movietype_label Then you told MySQL what tables you wanted to access and what type of join should be used to bring them together in these statements: FROM movie LEFT JOIN movietype 108 Chapter 3
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision web and email hosting services