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.
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):
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).