| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| release | 2010-09-12 | 441 Bytes | |
| README | 2010-09-12 | 2.2 kB | |
| sql2xml_v5.tar.gz | 2010-09-12 | 3.1 kB | |
| Totals: 3 Items | 5.7 kB | 0 | |
INTRODUCTION
============
Sql2xml is a perl cgi program that will help user or developer to request database query in json, csv, xml or ini format through a web server.
This single sql2xml support request from multiple user and multiple database
It is useful for those server which does not allow direct access to the database. it serves as a middle man
between your database and end user application.
Illustration
============
+------------+ CGI Request +------------+ +-------------------------------+
| Web Client |--------------------->|Web Server |<------------>|Database |
| |<---------------------|with SQL2XML| |Mysql, Posgresql,Oracle,DB2,etc|
+------------+ JSON/CSV/XML/INI +------------+ +-------------------------------+
REQUIREMENT
===========
Perl and Apache or any webserver that has perl support
Perl Module
-----------
libdbi-perl
libxml-simple-perl
libconfig-ini-simple-perl
libjson-perl
Option Perl Module
-----------
libdbd-mysql-perl
libdbd-pg-perl
libdbd-oracle-perl
libdbd-*
INSTALLATION
============
* Just copy sql2xml.pl and sql2xml.ini into your web server cgi-bin directory, make sure your web server has perl support.
Sample sql2xml.ini
==================
[report_1]
type=1 //0 for select query , 1 for update,insert, delete query
query=update mydb set name='{param1}' adderss='{param2}' where param3='{param3}'
host=hostname/ip address
database=data
username=user1
password=
format=xml //xml = xml format, ini = ini format
db=mysql //mysql,pg=postgresql,oracle,db2
key=newkey //(optional) key can be any series of characters, if key is defined and doesnt match, the query will not be executed
----------
or
----------
[setting_1]
db=mysql
database=data
username=user1
password=
host=localhost
format=xml
key=12345
[report_1]
type=1
query=update mydb set name='{param1}' adderss='{param2}' where param3='{param3}';
setting=setting_1
Usage Example
=============
http://localhost/cgi-bin/sql2xml.pl?report=report_1¶m1=myname¶m2=myaddress¶m3=myid&key=password
Contact
=======
Ang Tun Chek (atchek@eware.com.my)