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

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -