|
FlexDBTutorial
Take a look at AS3FlexDB Tutorial 1 tutorial from iTutorials.ro Simple exampleAll you need to load a table (for ex. "users") into a datagrid after you have install amfphp and set "services-config.xml" correctly is : <?xml version="1.0" encoding="utf-8"?>
<mx:Application
layout="vertical"
xmlns:phi="phi.db.*"
xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:DataGrid
id="dg1"
width="100%"
height="100%"
dataProvider="{q1.Records}">
<mx:columns>
<mx:DataGridColumn dataField="fname" headerText="First Name"/>
<mx:DataGridColumn dataField="lname" headerText="Last Name"/>
<mx:DataGridColumn dataField="password" headerText="Password"/>
</mx:columns>
</mx:DataGrid>
<phi:ConnectionData id="c1" name="mxml_conn1" host="localhost" db="test" username="root" password="root" />
<phi:Database id="db1" connection="{c1}" />
<phi:Query id="q1" database="{db1}" q="SELECT * FROM users WHERE 1" />
<phi:QueryExecute id="q1ex" query="{q1}" />
</mx:Application>Table structures is: CREATE TABLE `users` ( `id` int(5) NOT NULL auto_increment, `username` varchar(255) NOT NULL, `password` varchar(255) NOT NULL, `fname` varchar(255) NOT NULL, `lname` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
► Sign in to add a comment
good
so cool. I just try it. very great!. thanks so much!!!!
when i change "localhost" to other word (ex: 'cuong'), it not work. althought i create Privilages (ex: 'cuong' full control) in Mysql
please help me! thanks.
i have the problem above too. please help!
Running Flex 3. As soon as the example runs, I get this:
Error: A connection with the same name exist!
Hi everyone. I have a little problem. :) as3flexdb is working good. But when I try to execute "select" query, modal loading screen comes to screen. How do I ignore(discard) this pop -up? Any idea ?
Thanks.
can it be that there has been some refactoring etc.? i can't seem to find the interfaces Iquery and IDatabase... wierd! i followed the tutorial, the SWC imports perfectly (i don't get errors at the import statements etc.) but it can't find the interfaces. also, with code completion, the SWC has a different package structure:
NOT WORKING: import phi.interfaces.IDatabase; import phi.interfaces.IQuery;
WORKING: import phi.framework.sql.;
halp?
Hi, it's not working in my computer. There is an error -> A connection with the same name exist!
Pls help. Thanks.
Please help me
fault=[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: 'http://localhost/amfphp/gateway.php'"? messageId="7629FDAB-2473-4C38-C96D-D958422F85C9?" type="fault" bubbles=false cancelable=true eventPhase=2]