Advertisement
Guest User

Untitled

a guest
Oct 26th, 2016
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. var sql = require("seriate");
  2.  
  3. var config = {
  4. user: 'userName',
  5. password: 'password',
  6. server: 'serverIp',
  7. database: 'dataBaseName'
  8. };
  9.  
  10.  
  11. sql.setDefaultConfig( config );
  12.  
  13. sql.execute( {
  14. query:'select * from tableName '//By using this query you can search the the data in the table
  15. query:"insert into tableName (name,age,address,contactNo) VALUES ('shumi',23,'India',3838388)" // you can insert data using this query
  16.  
  17. } ).then( function( results ) {
  18. console.log( results );
  19. }, function( err ) {
  20. console.log( "Something bad happened:", err );
  21. } );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement