Prev | Current Page 194 | Next

Marc Delisle

"Mastering phpMyAdmin 2.11 for Effective MySQL Management"


Here, we have added one column using the Ins checkbox located under the unused
column (this time we will need it):
The Multi-Table Query Generator
[ 216 ]
Automatic Joins
phpMyAdmin can generate the joins between tables in the query it builds. Let's now
populate our two unused columns with the title and genre fields from our book
table and see what happens when we update the query:
phpMyAdmin used its knowledge of the relations defined between the tables to
generate a left join on the author_id key field. A shortcoming of the current version
is that only the internal relations are examined, not the InnoDB relations.
There may be more than two tables involved in a join.
Executing the Query
Clicking the Submit Query button sends the query for execution. In phpMyAdmin
version 2.11.0, there is no easy way (except by using the browser's Back button) to
come back to the query generation page after we have submitted our query. The next
chapter (Bookmarks) discusses how to save the generated query for later execution.
Chapter 13
[ 217 ]
Summary
In this chapter, we have covered various aspects such as opening the query
generator, choosing tables, entering column criteria, sorting and showing columns,
and altering the number of criteria rows or columns. We also saw how to use the
AND and OR operators to define relations between rows and columns, and how to use
automatic joins between tables.


Pages:
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206