# Understanding the Integration of Flash/PHP/MySQL/XML - All 4 together

**URL:** https://forum.kirupa.com/t/understanding-the-integration-of-flash-php-mysql-xml-all-4-together/41736
**Category:** flash
**Created:** [February 1, 2004, 12:18pm UTC](https://forum.kirupa.com/t/understanding-the-integration-of-flash-php-mysql-xml-all-4-together/41736 "2004-02-01T12:18:48Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rsassine](https://avatars.discourse-cdn.com/v4/letter/r/d9b06d/32.png) [@rsassine](https://forum.kirupa.com/u/rsassine)
#### Post date: [February 1, 2004, 12:18pm UTC](https://forum.kirupa.com/t/understanding-the-integration-of-flash-php-mysql-xml-all-4-together/41736/1 "2004-02-01T12:18:48Z")

</div>

Hello everyone,  
I am well verse in Flash/PHP/Mysql integration - BUT I cannot understand how XML might play an important or better role in designing my dynamic web site.

Because I’m dealing with transaction processes (Database stuff) I capture any changes, i.e., (Update, Insert, Delete) the user makes via Flash and I send that information to MySQL using PHP. I dont understand how XML can help me further.

Thanks,  
Raymond

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 5, 2004, 8:54pm UTC](https://forum.kirupa.com/t/understanding-the-integration-of-flash-php-mysql-xml-all-4-together/41736/2 "2004-02-05T20:54:28Z")

</div>

Vash - meant to thank you for making that tutorial, I learned a lot from it and now I effectively use flash+php+mysql+xml to deliver LOTS of database information efficiently.

If it helps anyone - what I do is load a php+mysql page as xml (header… read vash tutorial), convert that xml to an object in flash (just easier to deal with than node, node, node…) and then work with that. I wrote simple functions like getTable(a,b,c,d) that accepts a “pick” array and a “sort” array (they hold variables that function like WHERE and ORDER BY in sql).

So to load up a table, sort it by ‘year’, and only display entries where ‘jake’ is the author, I just write (this is AS displayed as PHP for better syntax highlighting):

```php

var pickBy = "jake";
var sortBy = "year";
pickBy_array.push('author=\"'+pickBy+'\"');
sortBy_array.push(sortBy);

newObjName = "jakeByYear";
pathToXML = "tableXML.php";

getTable(newObjName, pathToXML, pickBy_array, sortBy_array);

```

and voila! an object is created named “jakeByYear” and it has all the properties of the XML tree generated by querying the sql table with “SELECT \* FROM maintable WHERE author=“jake” ORDER BY year”.

Works like a charm with multiple values for each too (pick by author AND year for example).

Maybe I should write a tutorial…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 6, 2004, 12:01am UTC](https://forum.kirupa.com/t/understanding-the-integration-of-flash-php-mysql-xml-all-4-together/41736/3 "2004-02-06T00:01:51Z")

</div>

Sounds good.
