php - Export BIG mysql table to JSON -
i have mysql table 2.8 million records , want convert of these json. wrote script convert stops memory warning.
then tried create smaller files (file1 0, 100000 records, file 2 100000 1000000 records etc ) , combine windows copy command. works, each file json array (like [{...}]) , when merges, becomes separate sections [{}][{}] (where want [{................}])
is there better solution ?
i suggest change 'memory_limit' in php.ini configuration. if takes time can handle cron job(if possible)
or
you can decode json files , merge in single array , again encode in json , put in json file.
Comments
Post a Comment