I would really like to see a tutorial on how to write to a SQL data base using Flex, PHP, and MySQL.
Something similar to the tutorial "Creating PHP services for client applications", but for writting to instead of reading from.
So for example, it would be nice to make one of the columns editable, and a submit button for updating the database with your changes.
Also, I know the above tutorial is not part of "Flex In A Week", but you may be interested to know that it has a few mistakes. I tried to submit these mistakes already but was not sure if I submitted them to the correct place.
1) Under the section titled “Test the PHP service”, the script in step 1 references PHP_Services.php when it should be referencing EmployeeService.php. Also, although this is not necessary getemployees() should be camel case to match the function call in the class. Below is the correct script:
$o = new EmployeeService();
2) Under the section titled "Create a PHP class that implements a service", step 3 is to save the EmployeeService.php in the following location:
Further down the page in the section titled "Import the service into Flex and bind returned data to application components", the end of step 4 says:
"Use the location that already contains EmployeeService.php. Here is the location previously specified: <Web Root>/PHP_Service/"
This is not the path "previously specified". The correct path previously specified would be:
Also, the only path that worked for me was <Web Root>/PHP_Service-debug/ which was created by FlashBuilder. Not sure if this is correct or if I should have done a previous step differently.
3) Further down in this same section, in step 10 it says:
"Click Browse and navigate to the PHPservice.php file you created previously"
The correct file name is EmployeeService.php, not PHPservice.php.
4) In step 11 instead of "getBooks()", it should say:
"getEmployees() is the only operation available in the service."
5) Step 11 should also include all the steps required if this is the first time doing this and Zend is not installed. This is likely case for people using this tutorial.
Despite the mistakes, this was still a usefull tutorial once I figured all of this out.
Hi Greg - I'm not a PHP person, but have you tried the resources available at the Adobe Flex/PHP mini dev center:
I saw a link on that page to this PHP article:
It's about reading/writing to PHP and seems to have good comments from people who have found it useful.
Thanks. Shortly after I posted this, I did come across the cookbook example. It does look like a good example. I was in the middle of trying to convert the Flex example to work in FlashBuilder and then I got distracted by the boss man and a new project.