`
x放羊的星星
  • 浏览: 35542 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Query result in table

 
阅读更多
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:mx="library://ns.adobe.com/flex/mx"
               xmlns:esri="http://www.esri.com/2008/ags"
               xmlns:s="library://ns.adobe.com/flex/spark"
               pageTitle="Query Task (without a map)">
    <!--
         This sample shows how to query the server and displaying
         the result in a datagrid.
         The query is sent using the execute() method on a QueryTask.

         This sample sets up a QueryTask (what layer on what server to query).
         When the user clicks the "Get Details" button, a Query is sent with
         the user-provided text to search for.
         Meanwhile a DataGrid has been created which listens for the results
         (using executeLastResult) from the querytask.
    -->

    <s:layout>
        <s:VerticalLayout horizontalAlign="center" paddingTop="25"/>
    </s:layout>

    <fx:Declarations>
        <esri:QueryTask id="queryTask"
                        url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5"
                        useAMF="false"/>
        <esri:Query id="query"
                    outFields="[STATE_NAME,STATE_FIPS,SUB_REGION,STATE_ABBR,POP2000,POP2007]"
                    returnGeometry="false"
                    text="{stateName.text}"/>
    </fx:Declarations>

    <s:Panel title="Using Query tasks without maps">
        <s:layout>
            <s:VerticalLayout/>
        </s:layout>
        <s:HGroup verticalAlign="middle">
            <s:Label text="US state name: "/>
            <s:TextInput id="stateName" text="Carolina"/>
            <s:Button click="queryTask.execute(query);" label="Get Details"/>
        </s:HGroup>
        <mx:DataGrid id="resultsGrid"
                     dataProvider="{queryTask.executeLastResult.attributes}"
                     visible="{queryTask.executeLastResult != null}">
            <mx:columns>
                <mx:DataGridColumn dataField="STATE_NAME" headerText="State Name"/>
                <mx:DataGridColumn dataField="SUB_REGION" headerText="Region"/>
                <mx:DataGridColumn dataField="STATE_FIPS" headerText="FIPS"/>
                <mx:DataGridColumn dataField="STATE_ABBR" headerText="Abbreviation"/>
                <mx:DataGridColumn dataField="POP2000" headerText="Population 2000"/>
                <mx:DataGridColumn dataField="POP2007" headerText="Population 2007"/>
            </mx:columns>
        </mx:DataGrid>
    </s:Panel>
</s:Application>

注:Query里面的属性text真正的查询条件是,featuryLayer里的Display field = '%text%'
  • 大小: 6.9 KB
分享到:
评论

相关推荐

    Generic_SQL_Query

    Ideally adapter should only retrieve the poll quantity number of events from the event table, since retrieving all the records into the resultset increases the memory foot-print and also puts pressure...

    SSD7 选择题。Multiple-Choice

    (c) typing a syntactically correct SQL query that uses column and table names similar to the correct column and table names in a database (d) writing an English description of the data that the user...

    微软内部资料-SQL性能优化5

     If the table is a heap (in other words, it has no clustered index), the bookmark is a RID, which is an actual row locator in the form File#:Page#:Slot#. Finding Rows with a NC Index on a Heap ...

    clickhouse_en(1).pdf

    There is one large table per query. All tables are small, except for one. A query result is significantly smaller than the source data. In other words, data is filtered or aggregated, so the result ...

    Servlet查询数据库案例--Query(java源码)

    // Now try to execute the query and display the results in a table Statement statement = null; // An object to execute the query try { // Create a statement to use statement = db....

    购物网站中的购物车源代码

    $query = "SELECT * FROM $table WHERE session='$session' AND product='$product' "; $result = mysql_query($query); if(!$result) { return 0; } $numRows = mysql_num_rows($result); if($...

    query:从HyperLEDA Web数据访问服务查询

    查询HyperLEDA(query.hyperleda) 从HyperLEDA Web数据访问服务查询(注意:... query_object ( 'UGC12591' , properties = 'all' )&gt;&gt; &gt; print ( result_table ) # an astropy.table.Table pgc objname objtype ... c

    Devart UniDAC v5.3.10 Full Source

    -Now result parameter detection in UniConnection.ExecSQL is similar to the one in ODAC -Bug with connection establishing if the client has negative half-hour time zone is fixed -Bug with transactions ...

    plug-In PHP- 100 Power Solutions

    to-run PHP functions for solving most of the main problems you encounter when building a dynamic website with PHP. Every plug-in in the book offers a complete and working solution for a result you can...

    SSD7 EX1 答案

    In the file Rel-ops.txt, list which relational operations you used, from among the select/project/join operations, in order to perform this query. Explain the role of each operation in your query. 4...

    DbMouse Pro 5.6.3

    Use data preview ofr analysing of query result. GPS Visualiser -Visualise points, polygons, and lines on map. Use Open Street Map, Goole Maps, Bing maps and more than 50 other popular map providers....

    无限分类类库

    function getList($table,$pid=0,&$result=array(),$spac=0){ $sql="select * from {$table} where clsPath =$pid and status='1' order by clsLvl asc"; //echo $sql."&lt;hr&gt;"; $res=mysql_query($sql); while...

    smartgit 19.1.5 windows 安装包

    - opening a missing repository in 2 windows could result in an internal error when confirming the removal - possible internal error related to bare repositories - Index Editor: did not show a ...

    微软内部资料-SQL性能优化3

    In our example, if one transaction (T1) holds an exclusive lock at the table level, and another transaction (T2) holds an exclusive lock at the row level, each of the transactions believe they have ...

    4.8 mysqli_fetch_assoc记录集获取.pdf

    $result = $mysqli-&gt;query("SELECT * FROM table_name"); while ($row = mysqli_fetch_assoc($result)) { echo $row['field1'] . " " . $row['field2'] . " "; } ``` 知识点 2: 记录集获取 记录集是指 SQL 查询...

    [php]mysql数据库操作——DB类

    $this-&gt;result=mysql_query($this-&gt;sql,$this-&gt;conn); if (!$this-&gt;result) $this-&gt;show_error('SQL语句有误',true); return $this-&gt;result; } /***********************************************************...

    phpmaker610官方安装版

    Custom View with built-in visual query builder Basic reporting Export to Printer-friendly/HTML/Word/Excel/CSV/XML from List/View page Multi-column sorting User selectable page size Table-specific ...

    医院挂号系统源码(含数据库).pdf

    //对动态表镜像查询,SQL⽅式-未注册表 Table selectResult = tableEnv.sqlQuery("select * from " + table); 1.3 读取⽂本(FileSystem)数据,并使⽤TableAPI进⾏查询 //Flink1.10写法使⽤connect⽅式,读取txt⽂...

    PHP实例之新闻发布系统源码下载

    $result = mysql_query($query); $num = mysql_num_rows($result); $page_count = ceil($num/$page_size); //$offset = ($page_count-1)*$page_size; if(empty($_GET['page'])) { $page = 1; }else { $page = $_...

    SQLDirect_6.2.0_Full_Source

    query with an updatable result set query with macro support table component thread safe BLOB-fields (including LOB and BFILE for Oracle8) stored procedure support (with mutiple result sets for ...

Global site tag (gtag.js) - Google Analytics