2015年3月2日 星期一

generator-tableRead generator-ajax




***************************


tableRead Parameter : db, table , output, fields , format, callback, groupby, header
outputFile , distinct , order , where , key , value , limit , offset

("fields").replace(":", "=").replace("`", "'").replace("^", "%");
("where").replace(":", "=").replace("CoMmA", ",")

if (session.getAttribute("Login") == null {response.sendRedirect("index.jsp");}


******************************************************


/* Find the Max ******************************/
var s='tableRead?db='+DATABASE+'&table=DNOTE_HEADER&fields=MAX(SHIP_DATE)&format=S&callback=?';
$.getJSON(s, function(data0203) {if (data0203[0]){userStrVariable0=(data0203[0]);}}); 
/********************************************/

http://192.168.20.14:8080/erp/tableRead?
db=BR201312111529
&order=VEND_NO2
&limit=10000
&table=POBODY
&fields=VEND_NO2,SUM(PO_DOMAIN_AMT)
&where=where%20POHSTA:`A`%20or%20POHSTA:`D`%20
&groupby=VEND_NO2
&distinct=distinct
&format=S,S
&callback=?



{getJson}tableRead?distinct=distinct&table=PURCHASE_HEADER&limit=999999&fields=CREATEUSERNAME,CREATEUSERNAME&order=CREATEUSERNAME&format=S,S&callback=?{/getJson}



http://192.168.20.14:8080/erp/tableRead?
db=BR201312111529
&order=name
&limit=999999
&table=MANUFACTURER
&fields=RECORDID,name
&where=where%20status:`A`%20or%20status:`D`%20
&format=S,S
&callback=?

Config.txt

where=where POHSTA:`A`
formConstrain=and (POHSTA:`A`)
groupBy=VEND_NO2
orderBy=VEND_NO2
ascDesc=ASC
counter=VEND_NO2