1.0.0 • Published 10 years ago

katjs v1.0.0

Weekly downloads
4
License
-
Repository
github
Last release
10 years ago

KatJS

A lightweight NodeJS MySQL wrapper

Usage

Put the katjs folder in your node_modules folder

var KAT = require('katjs');

A typical set-up might look something like this

var KAT = require('katjs');

KAT.Connect('host','username','password','database');

// Query a single value
KAT.QueryValue("SELECT count(*) FROM users", function(data){
  // Callback here
});

// Query a single row
KAT.QueryRow("SELECT id,name FROM users WHERE id = ?", [1], function(data){
  // Callback here
});

//Query a whole table
KAT.Query("SELECT id FROM users WHERE name = ?, shoesize = ?",['Manolis', 11], function(data){
  // Callback here
});