mysql_connect("localhost", "root", "") or
die("Could not connect: " . mysql_error());
mysql_select_db("sdedecmsv57utf8sp1");
$result = mysql_query("SELECT title FROM dede_archives");
$file_index=1;
$i=1;
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
!$i%20 ? $file_index++ : $i++;
file_put_contents ( $file_index.'txt' , $row[0], FILE_APPEND );
}
mysql_free_result($result);
?>