# mysql-jdo

> MySQL JDO provides statement to secure SQL queries

Latest version **1.0.1** (published 2016-06-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install mysql-jdo
pnpm add mysql-jdo
yarn add mysql-jdo
bun add mysql-jdo
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-06-09 |
| First published | 2016-06-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Benny Polak |
| Maintainers | bennypolak |
| Keywords | mysql, jdo, statement |

## Links

- npm: https://www.npmjs.com/package/mysql-jdo
- Homepage: https://github.com/BennyPolak/mysql-jdo
- Issues: https://github.com/BennyPolak/mysql-jdo/issues
- npm.io page: https://npm.io/package/mysql-jdo

## Dependencies (2)

- [mysql](https://npm.io/package/mysql.md) latest
- [lodash](https://npm.io/package/lodash.md) latest

## Recent versions

- 1.0.1 (latest) — 2016-06-09

## README

# mysql-jdo
---
A node module: MYSQL JDO provides statement to secure SQL queries in Node.js

Version: 1.0.1

Author: Benny Polak

### Set database settings

Open the module file (node_modules/mysql-jdo/index.js)

```javascript
var connection 	= mysql.createConnection({
	host		: 'localhost',
	user 		: 'root',
	password 	: '',
	database 	: 'yourdatabase',
	dateStrings : true
});
```

### Initiate the module
```javascript
var db = require('mysql-jdo');
```

### Using the module

> Example 1: 

```javascript
db.JDOQuery('SELECT token FROM users WHERE username = :username', [{username: username}], function(response){
});
```

> Example 2: 

```javascript
var stmt = [
	{date: date},
	{room: room}
];

db.JDOQuery('SELECT * FROM meetings WHERE date = :date AND room = :room', stmt, function(response){
});
```

---
_Source: https://npm.io/package/mysql-jdo · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
