Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach ($tables as $table) {
- $rowsleft = 2;
- $fp = fopen($table.'.csv', 'w');
- $min = 0;
- $max = 100;
- while ($rowsleft > 0) {
- echo 'We do this?';
- $result = $mysqli->query("SELECT * FROM $table limit $min, $max");
- --$rowsleft;
- echo $result->num_rows;
- echo 'Rows.';
- while ($row = $result->fetch_assoc()) {
- fputcsv($fp, $row);
- }
- $min = $min + 100;
- $max = $max + 100;
- $result = '';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement