Summary
In this chapter, we covered the installation of the necessary infrastructure for keeping
special metadata (data about tables), and learned how to define relations between
both InnoDB and non-InnoDB tables. We also examined the modified behavior of
phpMyAdmin when relations are present, foreign keys, getting information from the
table, the Designer feature, and column-commenting.
Entering SQL Commands
This chapter explains how we can enter our own SQL commands (queries) into
phpMyAdmin and how we can keep a history of those queries.
The SQL Query Box
phpMyAdmin allows us to accomplish many database operations via its graphical
interface, but sometimes we have to rely on SQL query input to achieve complex
operations. Here are examples of complex queries:
SELECT department, AVG(salary) FROM employees GROUP by department
HAVING years_experience > 10;
SELECT FROM_DAYS(TO_DAYS(CURDATE()) +30);
The query box is available from a number of places within phpMyAdmin.
The Database View
We encounter our first query box when going to the SQL menu available in the
Database view.
Entering SQL Commands
[ 196 ]
This box is simple: we type in it some valid (hopefully) MySQL statement and
click Go. Usually, we don't have to change the standard SQL delimiter, which is
a semicolon, but a Delimiter dialog exists in case we need to??”this is covered in
Chapter 18.
Pages:
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191