Download Latest Version sql2xml_v5.tar.gz (3.1 kB)
Email in envelope

Get an email when there's a new version of sql2xml

Home / sql2xml_v4
Name Modified Size InfoDownloads / Week
Parent folder
release 2010-02-20 94 Bytes
README 2010-02-20 1.9 kB
sql2xml_v4.tar.gz 2010-02-20 2.7 kB
Totals: 3 Items   4.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



Usage Example
=============
http://localhost/cgi-bin/sql2xml.pl?report=report_1&param1=myname&param2=myaddress&param3=myid&key=password



Contact
=======
Ang Tun Chek (atchek@eware.com.my)
Source: README, updated 2010-02-20