$rs=$database->query("select node__field_production_name.field_production_name_value as production_name, ".
"node__field_scene_name.field_scene_name_value as scene_name, node.nid as production_id, node__field_download_url.field_download_url_value as production_download_url, ".
"node__field_belong_computer.computer_code as production_robot_code,node__field_app_name.field_app_name_value as app_name ".
"from {node} as node left join {node__field_production_name} as node__field_production_name on node__field_production_name.entity_id=node.nid ".
"left join {node__field_scene_name} as node__field_scene_name on node__field_scene_name.entity_id=node.nid ".
"left join {node__field_download_url} as node__field_download_url on node__field_download_url.entity_id=node.nid ".
"left join {node__field_app_name} as node__field_app_name on node__field_app_name.entity_id=node.nid ".
// "from {node__field_app_path} as node__field_app_path left join {node__field_user} as node__field_user on node__field_app_path.entity_id=node__field_user.entity_id ".
// "left join {node__field_production} as node__field_production on node__field_app_path.entity_id=node__field_production.entity_id ".
// "where node__field_user.field_user_target_id= :userid and node__field_app_path.bundle='setting_msg') as node__field_app_path on node__field_app_path.field_production_target_id=node.nid ".
"left join ( select node__field_computer_code.field_computer_code_value as computer_code,node__field_user.field_user_target_id,node__field_production.field_production_target_id from {node__field_belong_computer} as node__field_belong_computer ".
"left join {node__field_computer_code} as node__field_computer_code on node__field_belong_computer.field_belong_computer_target_id=node__field_computer_code.entity_id ".
"left join {node__field_user} as node__field_user on node__field_computer_code.entity_id =node__field_user.entity_id ".
"left join {node__field_production} as node__field_production on node__field_production.entity_id=node__field_belong_computer.entity_id ".
"where (node__field_user.field_user_target_id= :userid and node__field_computer_code.field_computer_code_value= :code ) and node__field_belong_computer.bundle='register_robot_code' ) as node__field_belong_computer on node__field_belong_computer.field_production_target_id=node.nid ".
/* "left join (select node__field_robot_code.field_robot_code_value,node__field_production.field_production_target_id,node__field_user.field_user_target_id from {node__field_robot_code} as node__field_robot_code left join {node__field_user} as node__field_user on node__field_robot_code.entity_id=node__field_user.entity_id ".
"left join {node__field_production} as node__field_production on node__field_robot_code.entity_id=node__field_production.entity_id where node__field_user.field_user_target_id= :userid and node__field_robot_code.bundle='register_robot_code' ) as node__field_robot_code on node__field_robot_code.field_production_target_id=node.nid ".
"where node.type='unity_production' and (node__field_belong_computer.field_user_target_id= :userid )and node__field_production_name.field_production_name_value like concat('%', :name ,'%') ",