hNasTddlZddlZddlZddlZdZdZdZda	d
dZ
dZdZdZ
d	Zy)N	localhost33061521c|dk(r	tjt|||a|dk(rKdtjd	<	|d
z|zdztzdztzd
z|z}tj|atjd
k(rtdtdtS#tj$r0}|j
d}|j
d}d|d|aYd}~d}~wwxYw#tj$r}d|aYd}~d}~wwxYw)Nmysql)hostuserpassworddatabaserzConnection Error -  oraclez'/u01/app/oracle/product/12.2.0/dbhome_1ORACLE_HOME/@:testzCONN=><br>)mydbconnectrconnErrorargsosenvironport2oradb
DatabaseErrorconfigRUN_MODEprint)r	pswdDBnameDBtypeeerrorNumerrorMsgconn_strs        1/home/sultans/web/python/demo/5cookie/shop1/DB.pyrrsw	?<<TtT6RDx"K

=!	-Cx}S(-c158#=fDH==*DhtF ;Kzz	?vvayHvvayH(
!H:>D	?""	-(,D	-s.B7C$C!1&CC!$D7DDcXd}tjdk(r
td|d	tj	}|j||j}|j}|j|r|}n9g}D]2}	d}
i}|	D]}|
}
|
d}|||<|
dz
}
|j|4tjdk(r
td	|d|S#tj$r!}|j\}}d|d|}Yd}~d}~wtj$r}d|}Yd}~d}~wwxYw)
NrSQL=>rDatabase Error - r
rrRESULT=>)rr r!rcursorexecutedescriptionfetchallcloserrrrrappend)sqlerrorr/metadatadatar%r&r'resultrowidict	col_valuecol_infocol_names               r)selectr@/s(
E
gc& 9
(s%%??$
CAD 	#A;#A;!*X1	!

MM$j ?M+::: vv8#H:Qxj9(#A3'(s$ACD)(DD)D$$D)ctjdk(r
td|d	tj	}|j||j
tj|j}tjdk(r
td|d|S#tj$r!}|j\}}d|d|}Yd}~Qd}~wtj$r}d|}Yd}~qd}~wwxYw)Nrr,rr-r
r.)rr r!rr/r0r3commitrowcountrrrrr)r5r/r9r%r&r's      r)updaterDTs
gc& 9
)s
j ?M::; vv8$XJaz:)$QC()s$ABC-,CC-C((C-ct|}|SNrDr5numRowss  r)insertrJjSkGNct|}|SrFrGrHs  r)deleterNsrKrL)r)rpymysqlr	cx_Oraclerrrport1rrrr@rDrJrNrLr)<module>rSsF




6J,rL