I
I
IIISeRgAnTIII2015-07-08 10:44:20
MySQL
IIISeRgAnTIII, 2015-07-08 10:44:20

How to parse a database table using JS or Node.js?

There is a MySQL database. From her one table, you need to extract data from all rows from certain cells and put it in txt files. I wanted to automate the process and applied the Node node-mysql module , which can return an object of the form ({id_0,cont_0},{id_1,cont_1},{id_1,cont_1}). But how to parse it in order to output it to files?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tex0, 2015-07-08
@IIISeRgAnTIII

I suspect that a JSON object is being returned to you.
So apply the JSON.stringify method to it to get the object in string representation.
Zaetm drive the line into the file.
( https://learn.javascript.ru/json#%D1%81%D0%B5%D1%8... )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question