SHARE
TWEET

Untitled

a guest May 30th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. foreach ($tables as $table) {
  2.     $rowsleft = 2;
  3.     $fp = fopen($table.'.csv', 'w');
  4.     $min = 0;
  5.     $max = 100;
  6.         while ($rowsleft > 0) {
  7.             echo 'We do this?';
  8.         $result = $mysqli->query("SELECT * FROM $table limit $min, $max");
  9.         --$rowsleft;
  10.         echo $result->num_rows;
  11.         echo 'Rows.';
  12.         while ($row = $result->fetch_assoc()) {
  13.             fputcsv($fp, $row);
  14.         }
  15.         $min = $min + 100;
  16.         $max = $max + 100;
  17.         $result = '';
  18.         }
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top