This is a simple class that can connect to a MySQL database, execute an SQL query, retrieve the result set rows and display it in a proper report format with different color flavors.
The class establishes a connection to MySQL and selects the named database. It executes the query using the query string passed. From the result set, the class extracts the number of rows, the number of columns, the names of each column in the result set. Using these and color theme passed as parameter, colorful reports are generated. |