PHP connect using JDBC

6.1k Views Asked by At

I have DBMS called BBJ DBMS. And installed JDBC , connecting to it via Java with no problems. but the thing i need to connect to it using PHP code. and this DBMC has ODBC only for windows. so i have no choice other than JDBC.

What is the most efficient solution for this case ?

Thanks in advance.

2

There are 2 best solutions below

5
On

JDBC is just for Java (hence the name, Java Database Connectivity)...

Check out MySQLi and PDO for connecting to a database with PHP.

0
On

BBj supports REST which can be consumed from most languages, including PHP. You would basically publish your data file as REST web service and then consume it using the REST API. There is a plug-in that supports publishing REST web services with CRUD functionality with BBj:

https://github.com/BBj-Plugins/RestBridge