i want to use pure python or Java library like zxjdbc to connect to postgresql 
...
But i don't find corresponding function dictresult() in jdbc or p8000, what is 
it used for?
following codes are not workable , only for dictresult() in Jython. Where to 
find the equivalent functions?
def Add_or_del_per(phone):
    db_conn=db_Connection()
    sql_desc="select uid from eh_user_info where phone='"+phone+"'"
    results=db_conn.createstatement().executeQuery(sql_desc).dictresult()    
##results=pgdb_conn.query(sql_desc).dictresult()
    result=results[0]["uid"]
    db_conn=db_Connection()
    sql_desc2="select count(patient_id) as counts from patients where 
customer_id='"+result+"'  and hospital_id='"+Hopital_id+"'"        
result2s=db_conn.createstatement().executeQuery(sql_desc2).dictresult()   
##result2s=pgdb_conn.query(sql_desc2).dictresult()
    result2=result2s[0]["counts"]
    return result2                                        
_______________________________________________
PyGreSQL mailing list
PyGreSQL@vex.net
https://mail.vex.net/mailman/listinfo.cgi/pygresql

Reply via email to