How to use the mysql.client function in mysql

To help you get started, we’ve selected a few mysql examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Pita / primarywall / WallManager.js View on Github external
var client = require('mysql').client;
var async = require('async');
var bcrypt = require('bcrypt');

/*********************************/
/* Wall Manager Functions        */
/*********************************/

exports.getWallsFont = function (wallid, callback)
{
  client.query("SELECT * FROM `primarywall`.`wall` WHERE `wallID` = ?", [wallid], function (err, results, fields)
  {
    var wallFont;
    if (err == null)
    {
      if (results.length == 1)
      {
github Pita / primarywall / UserManager.js View on Github external
var client = require("mysql").client;

/*********************************/
/* User Manager Functions        */
/*********************************/

var bcrypt = require('bcrypt');
var async = require('async');

/**
 * Check to see if User/Password is correct, returns correctauth = true with the callback if successful
 */

exports.checkUserPass = function (user, pass, callback)
{
  var correctauth = false;
  client.query("SELECT * FROM `primarywall`.`user` WHERE `UserID` =  ?", [user], function (err, results, fields)
github Pita / primarywall / DomainManager.js View on Github external
var client = require('mysql').client;
var async = require("async");

/*********************************/
/* User Manager Functions        */
/*********************************/

/**
 * Check to see if User/Password is correct, returns correctauth = true with the callback if successful
 */

exports.checkIfDomainExists = function (domain, callback)
{
  client.query("SELECT * FROM `primarywall`.`domain` WHERE `domainID` =  ?", [domain], function (err, results, fields)
  {
    var success=err == null;