MySQL Client Library for ePHP (Bragful)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc
include
src
test
.gitignore
.travis.yml
COPYING
Makefile
README.md
codecov.yml
covertool
php.ini
rebar.config
rebar.lock
rebar3

README.md

ePHP MySQL

Copyright (c) 2017 Altenwald Solutions, S.L.

Authors: "Manuel Rubio" (manuel@altenwald.com).

Build Status Codecov License: LGPL 2.1

This library implements the MySQL client library functions as is in PHP code for ephp keeping in mind to have it as pure 100% Erlang.

Requirements

ePHP MySQL requires to be run over an Erlang/OTP 17+, but not all the versions are full compatible or recommended. See the list:

Erlang Version Support Notes
20.0 ✔️ Recommended if you use OTP 20
19.3 ✔️ Recommended if you use OTP 19
19.2 ✔️
19.1 ✔️
19.0 ✔️
18.3 ✔️ Recommended if you use OTP 18
18.2.1 ✔️
18.2 ✔️
18.1 ✔️
18.0 ✔️
17.5 ✔️ Recommended if you use OTP 17
17.4 ✔️
17.3 fail in SSL
17.2 no tests available in Travis-CI
17.1 ✔️
17.0 ✔️

Getting Started

A simple way to use, is include in your project rebar.config the following dependency line:

    {ephp, ".*", {git, "git://github.com/bragful/ephp_mysql.git", master}}

And use the following code in your project:

{ok, Ctx} = ephp:context_new(),
ephp:register_module(Ctx, ephp_lib_mysql),
PHP = "<?php mysql_connect(...);",
{ok, Text} = ephp:eval(Ctx, PHP).

The result stored in Text should be:

...

Enjoy!

Modules

ephp_lib_mysql
ephp_mysql