katjs

1.0.0 • Public • Published

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
});

Readme

Keywords

Package Sidebar

Install

npm i katjs

Weekly Downloads

3

Version

1.0.0

License

none

Last publish

Collaborators

  • manolis