View Full Version : PHP and flex help
abed el salam
02-03-2007, 04:33 PM
Hi All
please can any one help me ..
How can i use PHP script in Flex to connect with database and server
bjornbjorn
02-08-2007, 08:23 AM
It's pretty straightforward. You use PHP on the server side and do what you usually do (connect to the db, run queries) - and then you return XML.
The XML can easily be read by Flex (Look up HTTPService and XML).
If you want, you can use a solution such as AMFPHP but in my opinion this will require you to do a lot more research before you begin to understand how things work. So I would suggest just playing around with outputting XML in a PHP script and trying to read it in Flex.
Good luck!
abed el salam
02-08-2007, 09:16 AM
i use xml in flex its easy but when i work with large amount of record
i could not convert db data to xml file it will take several time
i need to use data directly from db
thanks
bjornbjorn
02-08-2007, 10:00 AM
If you have performance issues try AMFPHP .. they have a C module.
I hear that hundred thousand records with 3 properties were converted in a second or something like that.
dr_zeus
02-08-2007, 05:44 PM
You also don't have to return all of the data at once if you have a large number of records. Limit it to 100 at a time (or some other number that works for you) and send multiple requests.
As bjornbjorn said, AMFPHP might be useful for you too.
vBulletin® v3.7.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.