Exportierte Tabellen (' . count($tables) . ')

'; echo ''; // get field infos foreach($tables as $table) { $fields = $indexes = array(); $res = mysqli_query($conn, 'SHOW FIELDS FROM ' . $table); while($row = mysqli_fetch_array($res, MYSQLI_NUM)) { $fields[] = $row; } mysqli_free_result($res); $res = mysqli_query($conn, 'SHOW INDEX FROM ' . $table); while($row = mysqli_fetch_array($res, MYSQLI_ASSOC)) { if(isset($indexes[$row['Key_name']])) $indexes[$row['Key_name']][] = $row['Column_name']; else $indexes[$row['Key_name']] = array($row['Column_name']); } mysqli_free_result($res); $structure[$table] = array( 'fields' => $fields, 'indexes' => $indexes ); } // output $structure = serialize($structure); $structure = base64_encode($structure); $structure = wordwrap($structure, 75, "'\n\t. '", true); echo '

Export-Daten

'; echo ''; echo '
'; // clean up mysqli_close($conn);