Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Database connection pooling with PHP and nodephp

branch: master
Octocat-spinner-32 CPool.php first commit May 20, 2012
Octocat-spinner-32 README README May 20, 2012
Octocat-spinner-32 db.php first commit May 20, 2012
Octocat-spinner-32 example1.php first commit May 20, 2012
Octocat-spinner-32 example2.php first commit May 20, 2012
Octocat-spinner-32 example3.php first commit May 20, 2012
README
We start the server:
php db.php

Simple example (fetchAll)
php example1.php
[{"uid":0,"0":0,"name":"Gonzalo","1":"Gonzalo","surname":"Ayuso","2":"Ayuso"},{"uid":1,"0":1,"name":"Hans","1":"Hans","surname":"Solo","2":"Solo"},{"uid":2,"0":2,"name":"Luke","1":"Luke","surname":"Skywalker","2":"Skywalker"}]

We parse the SQL and create a new statement
php example2.php

We execute our prepared statement
php example3.php
[{"uid":0,"0":0,"name":"Gonzalo","1":"Gonzalo","surname":"Ayuso","2":"Ayuso"},{"uid":1,"0":1,"name":"Hans","1":"Hans","surname":"Solo","2":"Solo"},{"uid":2,"0":2,"name":"Luke","1":"Luke","surname":"Skywalker","2":"Skywalker"}]
Something went wrong with that request. Please try again.