flex zend amf - display results in different labels -


i've got simple app getting information form database , displaying content datagrid.

instead of having information displayed in datagrid, i'd display in couple of labels (first name, last name, phone, etc.), i'm not sure how to.

currently on creationcomplete call php query function - looks this.

public function getpeople() {         return mysql_query("select * tbl_people order pers_name asc");     } 

then i'm putting results datagrid

<mx:datagrid id="empdg"  x="22" y="184" dataprovider="{amfcall.getpeople.lastresult}" click="showname()">     <mx:columns>         <mx:datagridcolumn headertext="id" datafield="pers_id" editable="false"/>         <mx:datagridcolumn headertext="name" datafield="pers_name"/>         <mx:datagridcolumn headertext="image" datafield="pers_img"/>         <mx:datagridcolumn headertext="job" datafield="pers_job"/>         <mx:datagridcolumn headertext="bio" datafield="pers_bio"/>     </mx:columns> </mx:datagrid> 

eventually query modified , ever return 1 row database. how results display in labels instead of datagrid?

your question vague @ best, here's me trying anyway:

<s:label text="first name: {data.firstname}" /> <s:label text="last name: {data.lastname}" /> <s:label text="phone: {data.phone}" /> 

i recommend read on how on binding , examples on data driven flex application, this 1 on blog.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -