Example #1
0
 public static function getException($message)
 {
     $trace = debug_backtrace();
     if (is_object($message)) {
         if ($message instanceof Exception) {
             $trace = $message->getTrace();
         }
         $message = $message->getMessage();
     }
     $obj = new BackendPhpPdo();
     $obj->what = 'EXCEPTION';
     $obj->message = $message;
     $obj->trace = $trace;
     header("HTTP/1.0 500 Internal Server Error");
     echo $obj->getMessage();
     die;
 }
Example #2
0
 public static function Tables()
 {
     if (is_null(self::$schema)) {
         self::$schema = BackendPhpPdo::req('database');
     }
     if (is_null(self::$schema)) {
         self::$schema = 'information_schema';
     }
     $req = '
             SELECT
                 ' . self::protect('TABLE_NAME') . ' as ' . self::protect('name') . ',
                 ' . self::protect('TABLE_COMMENT') . ' as ' . self::protect('comment') . ',
             FROM ' . self::protect('TABLES') . '
             WHERE
                 ' . self::protect('TABLE_SCHEMA') . ' = ?
         ';
     return self::$pdo->prepare($req)->bindValue(self::$schema, 'string')->execute()->fetchAll();
 }
Example #3
0
 public static function Keys($table)
 {
     BackendPhpPdo::getException('Not Implemented');
 }