Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var sql = require("seriate");
- var config = {
- user: 'userName',
- password: 'password',
- server: 'serverIp',
- database: 'dataBaseName'
- };
- sql.setDefaultConfig( config );
- sql.execute( {
- query:'select * from tableName '//By using this query you can search the the data in the table
- query:"insert into tableName (name,age,address,contactNo) VALUES ('shumi',23,'India',3838388)" // you can insert data using this query
- } ).then( function( results ) {
- console.log( results );
- }, function( err ) {
- console.log( "Something bad happened:", err );
- } );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement