|
- <?php
- header("Access-Control-Allow-Origin:*");
- //载入配置文件和连接数据库
- require_once 'Common/Mysql.php';
- $pdo=conn();
- //supplier array
- $sql = " SELECT id,main_corp_id,supplier_type,supplier_name FROM base_supplier WHERE cancel_flag = 0 ";
- $result=$pdo->query($sql);
- $search_result = $result->fetchAll(PDO::FETCH_ASSOC);
- $supplier_list = array();
- foreach( $search_result as $result_info ) {
- $supplier_list[$result_info["id"]] = $result_info;
- }
- set_memcache('ARY_ALL_SUPPLIER', $supplier_list );
-
- //user array
- $sql = " SELECT id,user_name,true_name FROM base_user WHERE id > 0 ";
- $result=$pdo->query($sql);
- $search_result = $result->fetchAll(PDO::FETCH_ASSOC);
- $user_list = array();
- foreach( $search_result as $result_info ) {
- $user_list[$result_info["id"]] = $result_info;
- }
- set_memcache('ARY_ALL_CSUSER', $user_list );
-
- //corp main array
- $sql = " SELECT id,corporation_name,full_name,supplier_id,sale_id FROM base_main_corporation WHERE corp_type = 1 AND cancel_flag = 0 ";
- $result=$pdo->query($sql);
- $search_result = $result->fetchAll(PDO::FETCH_ASSOC);
- $corp_list = array();
- foreach( $search_result as $result_info ) {
- $corp_list[$result_info["id"]] = $result_info;
- }
- set_memcache('ARY_ALL_CORP', $corp_list );
-
-
- ?>
|