Advertisement
Guest User

Untitled

a guest
May 11th, 2012
414
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var mysql = require('db-mysql');
  2. new mysql.Database({
  3.     hostname: 'localhost',
  4.     user: 'user',
  5.     password: 'password',
  6.     database: 'test'
  7. }).connect(function(error) {
  8.     if (error) {
  9.         return console.log('CONNECTION error: ' + error);
  10.     }
  11.     this.query("CALL p_stored_test(123)").
  12.         execute(function(error, rows, cols) {
  13.                 if (error) {
  14.                         console.log('ERROR: ' + error);
  15.                         return;
  16.                 }
  17.                 console.log(rows.length + ' ROWS found');
  18.         });
  19. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement