javascript - Returning multiple datasets to a Node.js View -


This is in my node .js / express project in my route / product.js file. How do I return more than one data set for using visualization? I have the data object and the dropdown object populated by the same query. I want to place the data object, but populate the dropdown object with a different query.

  export.edit = function (Rick, Race) {var id = req.params.id; Req.getConnection (function (error, connection) {connection.query ('SELECT * products from WHERE product_id =?', [Id], function (fault, rows) {if (err) console.log ("Error in selecting ;); Res.render ('products \\ edit', {page_title: "product: edit", save_button_title: "update", data: rows, dropdowns: rows});});} ); }    

You can either call another database within your first "Success" field Or you can try to do something like this:

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -