Mike Potter

July 20, 2006

Using PHP and Flex to Browse a MySQL Database

DevX has posted a good (though lengthy) tutorial / example on how to use Flex to browse a MySQL database, with PHP as the intermediate layer on their Adobe portal. While not as full featured as PHPMyAdmin (obviously), its a great example of the kind of interface that you could build with Flex.

I'd love to see a Flex based version of PHPMyAdmin, but apparently they've hardcoded quite a bit of the HTML output into the PHP logic.  I think that if PHP really wants to move forward in the enterprise space, developers really need to start doing a better job at seperating out the display from the logic, and stop assuming that every PHP application will be outputing HTML. 

For the record, quite a few PHP applications have this problem, its not limited only to PHPMyAdmin.  Even Drupal, one of my favourite apps, has this problem, as I blogged about a while ago.

technorati tags:, , , ,

Blogged with Flock

Posted by at 2:20 PM on July 20, 2006

Comments

Garvin — 5:07 AM on July 21, 2006

FYI: The phpMyAdmin team has actually already about 2 years ago agreed that templated output is the way to go, and just a few months ago we decided that Smarty Templating is one of the top mid-term priorities of phpMyAdmin.

But as always the problems with OS: The team is lacking manpower. Which is why I am posting here. If anybody wants to help enlarge the usefullness of a great PHP application and leverage it to future usages like Flex, please join and help the team. The PMA developers are very open and welcome every helping hand. Drop by their mailing list, all of them are actively monitoring it.

Best regards,
Garvin
[part of the PMA collective ;)}

Surya — 5:17 AM on August 30, 2006

please explain how to use php with flex 2 to display and inserting data in MySql database.
Please give any example link.
thanks
surya

Kasper — 11:02 AM on September 15, 2006

Dear,

I have troubles accessing the article "Using PHP and Flex to Browse a MySQL Database" (http://www.devx.com/Adobe/Article/31923).

It is re-linked to http://www.devx.com/DevX/Door/15838 and sais: "Page not found".

I used your article (the simple sample of php-flex-mySQL) to understand how to connect to a database, and it realy helped me out. Right now i'm wondering what is the article about...

- is it a broken link?
- do I do something wrong?
- is there a possibilty to find the article without going to the devx site? (pdf or something?)

best regard, Kasper

[Looks like the DevX site has been taken offline. To get the PHP connection, download the PHP RIA SDK by Adobe at http://code.google.com/p/adobe-php-sdk/ - Mike]

atanu — 1:47 AM on September 22, 2006

please explain how to use php with flex 2 to display and inserting data in MySql database.
Please give any example link.
thanks
atanu

[The best way to get started with PHP and Flex is to download the PHP RIA SDK by Adobe at http://code.google.com/p/adobe-php-sdk/ - Mike]

LucBM — 3:22 PM on September 17, 2007

I made my "PHP and Flex integration" by this way:
Got information from mysql database, build a XML file with PHP, and then get the XML informations with flex and display that. I dun know if that's the best way, but i'm sure that it's the easiest.

Note: I'm new in php flex mysql xml and etc then i'll listen to any advice u guys give me. Ty.

philipbkemp — 3:45 AM on September 15, 2008

"I'd love to see a Flex based version of PHPMyAdmin"...

Guess what I'm working on at the moment ;) At work I've been learning Flex and just think that it looks amazing. So far I've only got you logging in to the server through Flex/PHP, but more is coming. I'll set up a googlecode page for it when it's got a bit more functionality and let you know the link ..

philipbkemp — 5:39 AM on September 15, 2008

"I'd love to see a Flex based version of PHPMyAdmin"

So would I. That's why I'm making one!
http://code.google.com/p/myflexphpadmin/
Not very much is possible at the moment - it's only a project I'm working one when I've got a spare hour or so in the evenings, but I made a positive start over the weekend by getting a generic Flex/PHP communicator set up. Code will be there when a) it works and b) when I remember my USB stick

philipbkemp — 3:28 AM on September 16, 2008

"I'd love to see a Flex based version of PHPMyAdmin"

So would I

That's why I'm making one in my spare time. So far it just connects to the DB, getting PHP to work with Flex the way I wanted wasn't as easy as I thought, but when it's all done I'll post a link here to show it off ;)

philipbkemp — 3:31 AM on September 16, 2008

"I'd love to see a Flex based version of PHPMyAdmin"

So would I

That's why I'm making one in my spare time. So far it just connects to the DB, getting PHP to work with Flex the way I wanted wasn't as easy as I thought, but when it's all done I'll post a link here to show it off ;)

Thank you for signing in, You may now comment. (Sign Out)

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Add your comments

Remember Me?

(You may use HTML tags for style.)