0

My setup is as follows:

a) I am running Javascript on a set of figures (sourced from MongoDB) in a Linux command line and getting a set of values. b) I have a table setup on the same Linux machine in MySQL to hold these values obtained from Javascript.

How do I route the outputs from the Javascript to the MySQL table. I have read the post on connecting to a MySQL database on these forums. But is it also possible to include INSERT statements in that example?

It is a table for internal reporting purposes and the Linux machine is well protected so previous issues that were pointed out regarding security do not apply in my case I guess. But I could be wrong.

Kindly provide your inputs. Thank you in advance for your time and help.

5
  • What did you read? Also where is the javascript? Is it node.js or is it some javascript run in bash or something?
    – Sammaye
    Commented Nov 15, 2013 at 11:07
  • I am running MongoDB queries and storing the final results (which are numbers) into Javascript variables. It is Javascript in bash.
    – Manus
    Commented Nov 15, 2013 at 11:08
  • I don't understand your setup and what exactly you mean. Can you show some code and give examples for your data?
    – hgoebl
    Commented Nov 15, 2013 at 23:18
  • Hello hgoebl, Sorry for the late reply. Here is the layout of my setup:
    – Manus
    Commented Nov 18, 2013 at 9:58
  • var query = db.sample.count(). After that I have to move the var 'query' directly to a field QUERY in a MySQL table SAMPLE. I am running the above script using the following command in command line: mongo sample query.js where query.js has all the script code.
    – Manus
    Commented Nov 18, 2013 at 10:00

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.