Resource on the PHP API for monetdb
Hi every one,
I'm interested in accessing monetdb from a PHP script.
Can someone provide me a link on resource with introduce that.
The research of the keyword "monetdb" from the the http://php.net website search engine give no related result.
thanks in advance,
Best regards,
Fopa Léon Constantin
Hi,
There is a package pour php5 monetdb. For debian : https://www.monetdb.org/downloads/deb/dists/wheezy/monetdb/binary-amd64/ package : php5-monetdb-client_11.19.3-20141028_all.deb
There is two file : php_mapi.inc and php_monetdb.php
Pierre
Thanks !
----- Mail original -----
De: "Pierre-Adrien Coustillas" pcoustillas@1g6.biz À: "Communication channel for MonetDB users" users-list@monetdb.org Cc: "developers monetdb" developers-list@monetdb.org Envoyé: Lundi 24 Novembre 2014 09:27:48 Objet: Re: Resource on the PHP API for monetdb
Hi,
There is a package pour php5 monetdb. For debian : https://www.monetdb.org/downloads/deb/dists/wheezy/monetdb/binary-amd64/ package : php5-monetdb-client_11.19.3-20141028_all.deb
There is two file : php_mapi.inc and php_monetdb.php
Pierre
Hi Leon,
On 24 Nov 2014, at 09:04, Leon-Constantin Fopa leon-constantin.fopa@imag.fr wrote:
I'm interested in accessing monetdb from a PHP script.
Can someone provide me a link on resource with introduce that.
The MonetDB/PHP connector is included in the MonetDB source distribution, the latest version can be downloaded at [1]. Within that .zip file, you will find the connector in the folder clients/PHP. Basically, you need to include the file php_monetdb.php in the lib folder, and then the usage is very similar to e.g. the MySQL connector:
<?php require 'lib/php_monetdb.php'; $db = monetdb_connect($lang="sql", $host = "localhost", $port = 50000, $username = "monetdb", $password = "monetdb", $database = "demo" ) or trigger_error(monetdb_last_error()); $res = monetdb_query($db, monetdb_escape_string("SELECT * FROM TABLES")) or trigger_error(monetdb_last_error()); while ($row = monetdb_fetch_assoc($res)) { print_r($row); } ?>
See the examples folder for more details.
Hope this helps,
Hannes
[1] http://dev.monetdb.org/downloads/sources/Oct2014/MonetDB-11.19.3.zip
participants (3)
-
Hannes Mühleisen
-
Leon-Constantin Fopa
-
Pierre-Adrien Coustillas