You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

37 lines
1.3 KiB

  1. <?php
  2. header("Access-Control-Allow-Origin:*");
  3. //载入配置文件和连接数据库
  4. require_once 'Common/Mysql.php';
  5. $pdo=conn();
  6. //supplier array
  7. $sql = " SELECT id,main_corp_id,supplier_type,supplier_name FROM base_supplier WHERE cancel_flag = 0 ";
  8. $result=$pdo->query($sql);
  9. $search_result = $result->fetchAll(PDO::FETCH_ASSOC);
  10. $supplier_list = array();
  11. foreach( $search_result as $result_info ) {
  12. $supplier_list[$result_info["id"]] = $result_info;
  13. }
  14. set_memcache('ARY_ALL_SUPPLIER', $supplier_list );
  15. //user array
  16. $sql = " SELECT id,user_name,true_name FROM base_user WHERE id > 0 ";
  17. $result=$pdo->query($sql);
  18. $search_result = $result->fetchAll(PDO::FETCH_ASSOC);
  19. $user_list = array();
  20. foreach( $search_result as $result_info ) {
  21. $user_list[$result_info["id"]] = $result_info;
  22. }
  23. set_memcache('ARY_ALL_CSUSER', $user_list );
  24. //corp main array
  25. $sql = " SELECT id,corporation_name,full_name,supplier_id,sale_id FROM base_main_corporation WHERE corp_type = 1 AND cancel_flag = 0 ";
  26. $result=$pdo->query($sql);
  27. $search_result = $result->fetchAll(PDO::FETCH_ASSOC);
  28. $corp_list = array();
  29. foreach( $search_result as $result_info ) {
  30. $corp_list[$result_info["id"]] = $result_info;
  31. }
  32. set_memcache('ARY_ALL_CORP', $corp_list );
  33. ?>