ottlinger / hornherzogen

Project to manage Aikidō seminar registrations
GNU General Public License v3.0
0 stars 2 forks source link

Optimization: Extract into Databasehelper - Error wrapper #78

Closed ottlinger closed 7 years ago

ottlinger commented 7 years ago
            if (false === $dbResult) {
                $error = $this->database->errorInfo();
                print "DB-Error\nSQLError=$error[0]\nDBError=$error[1]\nMessage=$error[2]";
            }

is in every DB interaction class.

Extract to DatabaseHelper and parameterize with (database, dbResult) to properly and equally handle any database errors among the app.