Project: Implement HAVING
For the project of this chapter, we will introduce support for HAVING
under sorting in our basic database administration web application. Basically, a full-fledged web-based administration application should have support for JOIN
and, to a certain extent, subqueries. However, this functionality will be left for room to grow.
The goals of this project are straightforward:
Implement support for
HAVING
in the Python back-end of the applicationCode the HTML front-end to allow
HAVING
in conjunction with sorting
When we are done, we will also look at some ways that this application could (and should) be dressed up.
Revising the Python backend
Before implementing a user interface for any functionality, one naturally needs to code support into the program itself. In the case of HAVING
, we need to do the following in pymyadmin.py
:
Revise the
qaction
function to insertHAVING
into the MySQL statement that it passes toexecute()
Revise the
qaction
function call inmain()
Code support...