Thank you so much ! it works, and it
really helps me.
You made someone very happy for today ;-)
Thx,
William.
De :
[email protected] [mailto:[EMAIL PROTECTED] De la part de JesterXL
Envoyé : vendredi 24 mars
2006 23:05
À :
[email protected]
Objet : Re: [flexcoders]
[Flex 2 beta 2][AMFPHP 1.2.0-RC2 ] <mx:List dataProvider= "" >
help
[object Object] is what you want. However, you need to
tell your List what fieldName to read off of the object either via labelField,
or labelFunction.
----- Original Message -----
From: William Lambé
Sent: Friday, March 24,
2006 4:44 PM
Subject: [flexcoders] [Flex
2 beta 2][AMFPHP 1.2.0-RC2 ] <mx:List dataProvider= "" > help
Hello
everybody,
Here
is the PHP code :
$mysql = mysql_connect(localhost, "root", "");
mysql_select_db( "bapp_db" );
//return a list of all the students
$query_students = "SELECT CONCAT('Nom',' ','Prenom') AS nomAndPrenom FROM
student_tbl ORDER BY Nom ASC";
$students = mysql_query($query_students) or
die(mysql_error."<br>".$query_students);
while ($row = mysql_fetch_object($students)) {
$ArrayOfUsers[] = $row['nomAndPrenom'];
}
return( $ArrayOfUsers );
}
<![CDATA[
[Bindable]
public var PHPData:Array;
import flash.net.Responder;
public var gateway : RemotingConnection;
public function init(): void
{
var gatewayUrl:String = "http://localhost/flashservices/gateway.php";
gateway = new RemotingConnection( gatewayUrl );
// gateway.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
gateway.call( "adminbapp.getStudents", new Responder(onResult,
onFault));
}
public function onResult( result : Array ) : void
{
PHPData = result;
}
public function onFault( fault : String ) : void
{
trace( fault );
}
]]>
</mx:Script>
#################################
END CODE
#################################################### » » » »
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

