Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //mysql define part
- var mysql = require('mysql');
- var connect = mysql.createConnection({
- host: 'localhost'
- , database: 'users'
- , username: 'root'
- , password: ''
- });
- //in connection part
- io.sockets.on('connection', function(socket){
- //con
- connections.push(socket);
- console.log('connected: %s socket connected', connections.length);
- //update row value part & and the error in this line to
- connect.query("UPDATE users SET onoff= '1' WHERE UserName='sharkawey'");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement