A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: Learning PHP or SQL for high score table

  1. #1
    Senior Member Gloo pot's Avatar
    Join Date
    Aug 2005
    Location
    Australia Mate!
    Posts
    874

    Learning PHP or SQL for high score table

    I am going to learn one of the back end languages to make a high score table. My high score table is going to be preaty simple but i just want to know about the basics first.

    Whats the difference between PHP and SQL

    In flash how can i display a txt file with PHP or SQL

    In flash can i edit these txt files?

    Thats al for the time being, dont want to get ahead of my self.
    Also know of a good tute that might be able to help me.
    92.7 Fresh FM for all your South Aussies - Doof Doof music FTW people!

  2. #2
    ism BlinkOk's Avatar
    Join Date
    Aug 2001
    Location
    , location, location
    Posts
    5,002
    PHP is a script language (like actionscript and very similar to C or java) that allows you to do just about anything, it runs on the server and can recieve and send data from/to a flash client (or any client for that matter).
    SQL stands for Structured Query Language and it allows you to query and add/update a database. it is an english like language (although it doesn't make it any easier to learn)
    -
    your best bet is to start with just PHP.
    everything you need should be at http://www.php.net/downloads.php (including a very good windows based help system)
    you should prolly download apache server as well and install it on your machine so you can develop locally
    finally i would find an open source high score table (based on a text file not a database) and try to change it in some way (ie. adding a new field or making it configurable in some way)
    --
    once you have the hang of php then have a look at sql
    Last edited by BlinkOk; 04-12-2006 at 01:06 AM.
    Graphics Attract, Motion Engages, Gameplay Addicts
    XP Pro | P4 2.8Ghz | 2Gb | 80Gb,40Gb | 128Mb DDR ATI Radeon 9800 Pro

  3. #3
    Who needs pants? hooligan2001's Avatar
    Join Date
    Apr 2001
    Location
    Somewhere
    Posts
    1,976
    Yeah nice definition BlinkOk

    I think your setting the bar a little to high for your first project. I had the same problem when i first started , thinking whats the difference between PHP and SQL, then realised that yeah they are both programming languages but they do very different things. So you cant compare them. PHP cant talk directly to a database. So it uses SQL inside its scripts to issue commands to the database. Its common to use PHP with a MySQL databse. So what i would do before you confuse yourself trying some tutorials is try find some articles on each topic and try work out how each relates. There has to be a million+ PHP sites on the intrernet and a billion+ tutorials so you shouldnt have a problem. You could probably find a tutorial for making hi-score boards

    Best of Luck

  4. #4
    Senior Member Gloo pot's Avatar
    Join Date
    Aug 2005
    Location
    Australia Mate!
    Posts
    874
    Dont supose any of you's could answer my other 2 questions. I dont plan on making a high score table for ages, the only reason the title was that is because im aiming for that goal in the end. All i want to do is make flash display some text or somthing with PHP and then edit it in some way. But then again this might seem harder that i think.

    Thanks for the definitions
    92.7 Fresh FM for all your South Aussies - Doof Doof music FTW people!

  5. #5
    Who needs pants? hooligan2001's Avatar
    Join Date
    Apr 2001
    Location
    Somewhere
    Posts
    1,976
    Flash cant save to text files alone through actionscript. Unless your running it off your local machine for degub purposes. It's some sort of security safe guard. You can read directly from txt files though. But it has to be written as a variable in the txt file and need to be included at the start of your script.

    Eg - text file - textfile.txt

    txt = "blah blah blah blah blah blah blah blah blah blah blah blah blah blah";

    Eg - actioscript

    include "textfile.txt"

    You can write to a txt file with the use of PHP though.

  6. #6
    ism BlinkOk's Avatar
    Join Date
    Aug 2001
    Location
    , location, location
    Posts
    5,002
    i think he means using loadvars in flash to do some basic communication with the server via php.
    yeah you can do this but i still think the best way to learn it is to pick up some highscore table and have a look at it. all they really do is receive a nickname and value, add it to a table, sort it and then return the table. easy as
    Graphics Attract, Motion Engages, Gameplay Addicts
    XP Pro | P4 2.8Ghz | 2Gb | 80Gb,40Gb | 128Mb DDR ATI Radeon 9800 Pro

  7. #7
    Senior Member SlimSlaby's Avatar
    Join Date
    May 2005
    Posts
    158
    I use ASP and SQL with a Access Database. It's really not all that complicated.

    Are there any advantages to PHP over ASP ? I haven't ever used PHP, but it seems like alot of people on here do.

  8. #8
    Senior Member Gloo pot's Avatar
    Join Date
    Aug 2005
    Location
    Australia Mate!
    Posts
    874
    Oh ok, when i get around to it ill go google some open source high score tables, and do you know the site to get that aphace thing or anything else i need?
    92.7 Fresh FM for all your South Aussies - Doof Doof music FTW people!

  9. #9
    ism BlinkOk's Avatar
    Join Date
    Aug 2001
    Location
    , location, location
    Posts
    5,002
    what are the odds?
    http://www.apache.org/
    Graphics Attract, Motion Engages, Gameplay Addicts
    XP Pro | P4 2.8Ghz | 2Gb | 80Gb,40Gb | 128Mb DDR ATI Radeon 9800 Pro

  10. #10
    Senior Member Gloo pot's Avatar
    Join Date
    Aug 2005
    Location
    Australia Mate!
    Posts
    874
    I know but i went to the downloads and there is like 100 different ones, which one if right for me?

    Any of you guys know the actual link to the download
    92.7 Fresh FM for all your South Aussies - Doof Doof music FTW people!

  11. #11
    ism BlinkOk's Avatar
    Join Date
    Aug 2001
    Location
    , location, location
    Posts
    5,002
    http://httpd.apache.org/download.cgi
    your lookin for the http server
    version;
    Apache HTTP Server 2.0.55
    win32 binary (unless your a mac dude)
    remember you gotta download and install php separatly
    Graphics Attract, Motion Engages, Gameplay Addicts
    XP Pro | P4 2.8Ghz | 2Gb | 80Gb,40Gb | 128Mb DDR ATI Radeon 9800 Pro

  12. #12
    Senior Member
    Join Date
    Jul 2005
    Posts
    113
    If you're going to install PHP, Apache, MySQL and phpMyAdmin on your local machine here's a useful guide that I've used several times: www.webmasterstop.com/48.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center