AS3 and database [ SQL vs MYSQL ]

I was wondering if working with SQL server is different than working with MYSQL.
If it is, how do I connect to a SQL server and read and write to it.

Angha110Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
dgofmanConnect With a Mentor Commented:
You can use at least 10 options retrieve data in PHP using MySQL connection.

For example using this library:

http://www.tonymarston.net/php-mysql/dom.html

or simply create a SQL query (what I used in the past, to avoid marshaling data via result set)

SELECT GROUP_CONCAT('<timezone id="', Time_zone_id, '" offset="', Offset , '" code="', Abbreviation,'"></timezone>' SEPARATOR '\n' ) AS xml FROM `time_zone_transition_type`

And you will pass this string to the Flex on the Flex side using  mx:HTTPService  you will get result as string. You just need to convert to XMLList. “new XMLList(phpResult)”
0
 
dgofmanCommented:
From end user and Flex Developers no diffrences you are using MSSQL or MySQL or DB2 or Oracle ect.
0
 
Angha110Author Commented:
So, I should do the same with the SQL server connection as I do for mysql?
0
Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

 
dgofmanCommented:
You are not connecting to the databse you have to create HTTP connection to your server.
Using RemoteObject (AMF), WebService (SOAP), XMLSocket etc. And on backend implements a database communication.
0
 
Angha110Author Commented:
I have been using PHP to access MYSQL and that is the only way I know how,
Could I do the same?
0
 
dgofmanCommented:
0
 
dgofmanCommented:
If you will get access to MySQL in PHP should can transfer data over the internet using AMF, XML or JSON format
0
 
Angha110Author Commented:
XML
0
 
dgofmanCommented:
In this case connect to MySQL
Run query: mysql -uroot --xml -e 'SELECT * FROM TABLE'
(It will generate XML output)
Send this result to the client using HTTP connection
and on the client side convert string to XML
var xml:XML = new XML(str);
0
 
dgofmanCommented:
or you can get result set and create your output.

Example:

http://devzone.zend.com/article/11
0
 
Angha110Author Commented:
In this case connect to MySQL
Run query: mysql -uroot --xml -e 'SELECT * FROM TABLE'
(It will generate XML output)
Send this result to the client using HTTP connection
and on the client side convert string to XML
var xml:XML = new XML(str);

Open in new window


Will you please open this up for me, a little more details so I can do it in my Flash project.

Thanks,
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.