Data parsing of workflow plug-ins and list controls of Tongda OA

Source: Internet
Author: User
Data parsing of the workflow plug-in and list control of Tongda OA: Data parsing of the Tongda OA workflow plug-in and list control: the reference code is as follows: & lt ;? Include_once (data parsing of the Tongda OA workflow plug-in and list control:

The reference code is as follows:

 
 "; $ Query =" select * from x_hr_code where parent_no = 'gangweizhiwu' order by code_no asc "; $ cursor = exequery (TD: conn (), $ query ); while ($ row = mysql_fetch_array ($ cursor) {echo $ row ["CODE_NAME"]. ",";} echo ""; $ query = "select * from x_hr_code where parent_no = 'gangweidengji 'order by code_no asc"; $ cursor = exequery (TD :: conn (), $ query); while ($ row = mysql_fetch_array ($ cursor) {echo $ row ["CODE_NAME"]. ",";} echo ""; $ query = "select * from x_hr_code where parent_no = 'gangji 'order by code_no asc"; $ cursor = exequery (TD :: conn (), $ query); while ($ row = mysql_fetch_array ($ cursor) {echo $ row ["CODE_NAME"]. ",";} echo ""; $ query2 = "select data_57 from flow_data_316 where run_id = 44436 limit 1"; $ cursor2 = exequery (TD: conn (), $ query2); while ($ row2 = mysql_fetch_array ($ cursor2) {$ mingxi = $ row2 ['data _ 57 '];} echo $ mingxi."
"; $ Mingxi = str_replace (" \ r ", $ mingxi); // \ r uses two characters as the carriage return, and the carriage return character is stored in data_3, instead of spaces, replace the carriage return with "," comma; echo $ mingxi."
"; $ Mingxi = substr ($ mingxi, 0,-2); // remove the last two characters, including the comma echo $ mingxi ."
"; $ Arr = explode (", ", $ mingxi); // use, split by commas (,) to separate each record in the list 'print _ r ($ arr ); // echo"
"; $ Count = count ($ arr); // how many records exist echo $ count ."
"; For ($ I = 0; $ I <$ count; $ I ++) {$ update_str =" "; $ bianhao =" "; $ ganweizhiwu = ""; $ gangweidengji = ""; $ gangji = ""; $ arr [$ I] = substr ($ arr [$ I], 0,-1 ); // remove the last character 'substr ($ arr [$ I],-1) to obtain the echo $ arr [$ I]."
"; $ Arr [$ I] = explode (" "', $ arr [$ I]); // split it into a two-dimensional array print_r ($ arr [$ I]); $ bianhao = $ arr [$ I] [1]; $ gangweizhiwu = GET_CODE_NO ($ arr [$ I] [4], "gangweizhiwu "); // Job Name $ gangweidengji = GET_CODE_NO ($ arr [$ I] [5], "gangweidengji "); // job level $ gangji = GET_CODE_NO ($ arr [$ I] [6], "gangji"); // job level echo"
"; Echo $ bianhao." ---- ". $ gangweizhiwu." ---- ". $ gangweidengji." ----- ". $ gangji." --- "; echo" "; if ($ gangweizhiwu! = "") {$ Update_str = "gangweizhiwu =". $ gangweizhiwu. "," ;}if ($ gangweidengji! = "") {$ Update_str. = "gangweidengji =". $ gangweidengji. "," ;}if ($ gangji! = "") {$ Update_str. = "gangji =". $ gangji. ",";} if ($ bianhao! = "") {$ Update_str. = "STAFF_NO = ". $ bianhao. ""; $ query3 = "update x_hr_staff_info set ". $ update_str. "where STAFF_NO = ". $ bianhao. ""; echo $ query3 ."
"; Exequery (TD: conn (), $ query3) ;}} function GET_CODE_NO ($ CODE_NAME, $ PARENT_NO) {if ($ CODE_NAME = "" | $ PARENT_NO = "") {return "";} $ query = "SELECT CODE_NO from X_HR_CODE where PARENT_NO = '". $ PARENT_NO. "'and CODE_NAME =' $ CODE_NAME '"; $ cursor = exequery (TD: conn (), $ query); while ($ ROW = mysql_fetch_array ($ cursor )) {$ CODE_NO = $ ROW ['code _ no'];} return $ CODE_NO;}?>

The above introduces the workflow plug-in and list control data parsing of Tongda OA, including some content, and hope to be helpful to friends who are interested in PHP tutorials.

Related articles:

PHP workflow custom form solution

How to implement a workflow?

This article introduces a reference for workflow design that truly conforms to China's national conditions (including PHP implementation)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.