PDA

View Full Version : Searching with databases


billabong0202
01-30-2008, 03:50 PM
I am new to the flash/actionscript community so some of these questions may seem dumb but bear with me please. I am not so much looking for an exact answer or code, moreso a direction to go in, something to research, anything that may help.

1. Is this possible.
I want to be able to use a database that can be easily updated to store information. From there, i want to search through differnt feilds of my database and for them to be displayed in flash. What would I research to find 1. how to connect to a database like mysql and 2. how to formulate such a search algorithm. also, each result displayed would need to be a link perform another search of the same database of a differnt feild. Is that possible?

If that is possible, is it all possible with actionscript 3.0 or will i need to use some other language as well.

How time consuming is something like this if i had about 100 entries with 4 or 5 fields each.

2.
I also want to learn more about button control of the timeline. Is there a certain topic that would encompass what i am trying to do.

Again, sorry if these questions are stupid or confusing, I just need some direction in learning actionscript. Its difficult to read those books cover to cover. Thanks for your help!

hangalot
01-30-2008, 04:36 PM
its very easy if you use AIR which requires the person to instal your app and the AIR runtime.
i search a hierarchy of 6 levels with 178k records on the bottom level in less than a second (using LIKE as well). SQLite with AIR is very fast

Selecters75
01-30-2008, 05:12 PM
If you don't have many records, maybe you could consider store your records in a XML file. And using the great seearch/transverse functionalities that E4X adds to AS3.
(from http://www.sephiroth.it/tutorials/flashPHP/E4X/):
Actionscript 3.0 finally introduced the powerful XML handling E4X ECMAScript for XML.
This new class introduces a new way to look at the XML strings using native actionscript objects.
You can read the full specifications of this powerful sub-language at http://www.ecma-international.org/../Ecma-357.htm

Bombdogs
01-30-2008, 05:59 PM
The traditional route is to use a server side scripting language like PHP - flash talks to PHP, PHP retrieves data from database, PHP passes data back to flash.

This may also be of interest, the security situation isn't clear, but it's supposed to be very fast....

http://asql.mooska.pl/

PMF

panel
01-30-2008, 07:01 PM
Yes best way is to use server side script witch will return data (usually xml) with then will be parsed inside flash.
Personaly I am using .Net with Webservices

hangalot
01-30-2008, 07:03 PM
xml is prob your worst way. if you are going to a remote server then use blaze.
i would not deploy the mysql sollution, not because i think its a bad project but i anticipate endless deployment issues.

billabong0202
01-30-2008, 07:56 PM
So there are alot of options here. I dont really know anything about any of them. but i am thinking about going the PHP MYSQL option unless anyone has a better, less difficult idea.

panel
01-30-2008, 08:18 PM
@hangalot you are right... :rolleyes:

billabong0202
01-31-2008, 01:09 AM
what is blaze and where can I learn about how to use it with flash?

Durnus
01-31-2008, 03:27 AM
what is blaze and where can I learn about how to use it with flash?

Well, in my opinion mysql is very hard to use (I could never figure it out :rolleyes:)

What I think would be be easier is using php to retrieve text documents for your flash, and using php to modify them as well. My text documents are actually XML documents, but they are really just text files named .xml. If you're looking for the professional approach please carry on and learn about all this fancy stuff everyone's talking about. Probably much faster. But a simple text reading php file is all it takes...

(But that IS assuming you know php...)

billabong0202
01-31-2008, 02:14 PM
Using a text file would be more trouble than it is worth. I have multiple feilds of data for each entry. I might as well take the time to learn how to do it for when I do have a bigger project that needs a database.
Any final suggestions?