To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Product Support > Koolmoves

Reply
 
Thread Tools Search this Thread Display Modes
Old 12-19-2006, 10:51 PM   #1
dniezby
Senior Member
 
Join Date: Jul 2001
Location: Tinley Park, IL
Posts: 702
KM & MySql

Here is my issue:
I need to load different information on same frame of my movie depending on which button is pressed on a page. The reason is, so I don't have to make the movie any bigger than it has to be. It's also so that updates to the site are as simple as adding a new player button.

Ok, I'm not worried about filling in the MySql table with Data for now. I can do that manually (for now). How do I set up the button to call information from the database.

Here are the items I need to call from a database into my movie.

Player Name = txt1
player image=txt2 (can I even present an image here?)
member since=txt3
awards=txt4
clanrank =txt5 -Same issue as with player image.

I'll add more information later but if I can learn to pull out this information, I can make the updates later.

The user will click on a button that button will load that specific player's information into the data fields.
----------NOTE --------------
I've already tested Chris' SQL_Menu2 but it doesn't work. I think there's been a change to the syntax. I even had to update the syntax on the .sql file just to insert the information into the database.
But I am still looking into it's code.
------------------------------
__________________
My Sites: Gaming Site Nightshade Studios MyKM Tutorials

--------------------------------------------------
What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape
dniezby is offline   Reply With Quote
Old 12-19-2006, 11:18 PM   #2
Chris_Seahorn
up to my .as in work
 
Chris_Seahorn's Avatar
 
Join Date: Dec 2004
Posts: 4,364
OK man...cut it out.

You know they tested all my stuff before approval. I just downloaded both fresh. Dumped the sql with phpmyadmin, edited the common.php files with my connection info and here they both be:

http://flex.hobby-site.com/examples/...SQL_Menu1.html
http://flex.hobby-site.com/examples/...SQL_Menu2.html
Chris_Seahorn is offline   Reply With Quote
Old 12-19-2006, 11:21 PM   #3
Chris_Seahorn
up to my .as in work
 
Chris_Seahorn's Avatar
 
Join Date: Dec 2004
Posts: 4,364
I finally decided on a portal for my site. Anyone needs help with my KM stuff...feel free to stop by. I'll get the forum up (nothing fancy, just the facts). Better than dumping issues with my stuff on the KM forum (it was never really suggested even when I was current here). This keeps Bob focused on his app and not having to deal with my baggage.
Chris_Seahorn is offline   Reply With Quote
Old 12-19-2006, 11:36 PM   #4
dniezby
Senior Member
 
Join Date: Jul 2001
Location: Tinley Park, IL
Posts: 702
LOL, I knew this would bring you out.

But kidding asside, here is what happens when I dump the SQL_Menu2.sql file
Quote:
Originally Posted by phpmyadmin
Error

SQL query:

--
-- Table structure for table `sqlmenu_2`
--
CREATE TABLE `sqlmenu_2` (
`id` int( 11 ) NOT NULL AUTO_INCREMENT ,
`name` varchar( 25 ) COLLATE latin1_general_ci NOT NULL ,
`target` varchar( 100 ) COLLATE latin1_general_ci NOT NULL ,
PRIMARY KEY ( `id` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1 COLLATE = latin1_general_ci AUTO_INCREMENT =6;

MySQL said: Documentation
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'collate latin1_general_ci NOT NULL,
`target` varchar(100) co
Then I modified the common.php
Code:
<?php

$hostname_PD = "localhost";
$database_PD = "dniezby_koolmoves";
$username_PD = "dniezby_km1";
$password_PD = "XXXXXX";  // Obviously, I removed my password
$PD = mysql_connect($hostname_PD, $username_PD, $password_PD) or trigger_error(mysql_error(),E_USER_ERROR); 
?>
Then uploaded the html, swf, common.php,SQL_Menu2.php to my server.
And this is what I get.
http://www.nssclan.org/km/menutest/SQL_Menu2.html
------------- Server Info -------------
MySQL client version: 4.1.10
phpMyAdmin - 2.9.0.2
Server version: 4.0.27-standard
Protocol version: 10
Server: Localhost via UNIX socket
__________________
My Sites: Gaming Site Nightshade Studios MyKM Tutorials

--------------------------------------------------
What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape
dniezby is offline   Reply With Quote
Old 12-19-2006, 11:46 PM   #5
dniezby
Senior Member
 
Join Date: Jul 2001
Location: Tinley Park, IL
Posts: 702
Here is the modified SQL_Menu2.sql code as phpmyadmin listed in my version.
Quote:
-
-- Table structure for table `sqlmenu_2`
--

CREATE TABLE `sqlmenu_2` (
`id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`name` VARCHAR( 25 ) NOT NULL ,
`target` VARCHAR( 100 ) NOT NULL
) TYPE = MYISAM ;


--
-- Dumping data for table `sqlmenu_2`
--

INSERT INTO `sqlmenu_2`( `id` , `name` , `target` ) VALUES ('1', 'Home', 'home'),('2', 'Our Products', 'content'),('3', 'Contact Us', 'contact'), ('4', 'Featured Links', 'links'),('5', 'About Us', 'about');
NOTE: THIS IS FROM MY VERSION OF PHPMYADMIN
__________________
My Sites: Gaming Site Nightshade Studios MyKM Tutorials

--------------------------------------------------
What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape

Last edited by dniezby; 12-19-2006 at 11:59 PM.
dniezby is offline   Reply With Quote
Old 12-19-2006, 11:47 PM   #6
Chris_Seahorn
up to my .as in work
 
Chris_Seahorn's Avatar
 
Join Date: Dec 2004
Posts: 4,364
See post #3

I'm on phpmyadmin 2.9.0.1. Dumped fine even with the commented lines (you may have to remove them because some versions are picky). phpmyadmin created that dump. As for the backends in ALL my MySQL stuff you have to replace

if (!$result) {
fail("No database");
}


with

if (!$result) {
//or some other error that displays a message
exit;
}

"fail" is a function I use locally that slipped by in all my submissions.

Last edited by Chris_Seahorn; 12-19-2006 at 11:55 PM.
Chris_Seahorn is offline   Reply With Quote
Old 12-20-2006, 12:06 AM   #7
dniezby
Senior Member
 
Join Date: Jul 2001
Location: Tinley Park, IL
Posts: 702
Wow, could they really have made that much of a change between versions?

I just replaced the above code into your SQL_Menu2.sql file (left in the comments for testing purposes).

It dumped wonderfully.
__________________
My Sites: Gaming Site Nightshade Studios MyKM Tutorials

--------------------------------------------------
What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape
dniezby is offline   Reply With Quote
Old 12-20-2006, 12:22 AM   #8
Chris_Seahorn
up to my .as in work
 
Chris_Seahorn's Avatar
 
Join Date: Dec 2004
Posts: 4,364
Yeah, some of the versions were nutty.
Chris_Seahorn is offline   Reply With Quote
Old 12-20-2006, 03:05 AM   #9
dniezby
Senior Member
 
Join Date: Jul 2001
Location: Tinley Park, IL
Posts: 702
You'll see where I want to display this info by visiting the site
http://www.nssclan.org

Then click the Folder on the right. - yes, it will say that "Feature not available yet".
Once the folder is open, Click on the player name, Shadow_Viper1...This is where the specific information will eventually be presented.
How to present it, still escapes me.
__________________
My Sites: Gaming Site Nightshade Studios MyKM Tutorials

--------------------------------------------------
What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape
dniezby is offline   Reply With Quote
Old 12-20-2006, 03:20 AM   #10
Chris_Seahorn
up to my .as in work
 
Chris_Seahorn's Avatar
 
Join Date: Dec 2004
Posts: 4,364
LOL...ok...how can I put this.....

I'm not sure what is more frustrating. The fact that after seeing this post sit here, since it's focused on my code (or spurred by it), and ending up having me feeling bad that users of my code are out there swinging which ultimately resulted in me installing a forum module to answer these questions that for some reason you are not taking advantage of....OR....the fact you are using the wrong example to learn from.

Last edited by Chris_Seahorn; 12-21-2006 at 12:03 PM.
Chris_Seahorn is offline   Reply With Quote
Old 12-20-2006, 08:58 AM   #11
blanius
KoolMoves Moderator
 
blanius's Avatar
 
Join Date: Jul 2001
Location: Atlanta GA
Posts: 4,911
Have you successfully gotten the info in from the database now?

Are you using Chris's menu code to generate the list of users?

Knowing your data structure and query would help me answer
blanius is offline   Reply With Quote
Old 12-20-2006, 09:01 AM   #12
Chris_Seahorn
up to my .as in work
 
Chris_Seahorn's Avatar
 
Join Date: Dec 2004
Posts: 4,364
He's all set.
Chris_Seahorn is offline   Reply With Quote
Old 12-20-2006, 10:51 AM   #13
blanius
KoolMoves Moderator
 
blanius's Avatar
 
Join Date: Jul 2001
Location: Atlanta GA
Posts: 4,911
Quote:
Originally Posted by Chris_Seahorn
He's all set.
Good, I was confused as his last post he still sounded like he didn't know what to do to present his data.
blanius is offline   Reply With Quote
Old 12-20-2006, 11:03 AM   #14
Chris_Seahorn
up to my .as in work
 
Chris_Seahorn's Avatar
 
Join Date: Dec 2004
Posts: 4,364
Yeah, what he needs we don't really have an example of so I'm going to make him a basic one that gets him going. Just something that he can build upon. He'll most likely be by to confirm (I think).

For what it's worth....anyone else trying to setup inbound/outbound MySQL with KM would be better served to dissect my forum submission (and it's backends) since that sends data both ways using the two common methods (loadVariables and loadVars). The menu examples are only inbound.

EDIT:

I should explain a bit better. By "inbound" I mean the flash frontend simply makes a call to a backend that sends in data that is fairly static. The data is always the same. An example of an outbound/inbound menu would be if I coded a cms that stores a permission level in the table with the menu data. The flash frontend would not only make a call to the backend for the menu but would also POST the permission level (just for instance). The backend would then send in whatever menu items meet the criteria...thereby making it relational to what was POSTed. Whatever your rank is decides what you see on the frontend.

Dniezby needs to POST out a username and retrieve that users stored information. A classic outbound/inbound these days handled with a sendAndLoad loadVars.

Last edited by Chris_Seahorn; 12-20-2006 at 11:18 AM.
Chris_Seahorn is offline   Reply With Quote
Old 12-20-2006, 11:53 AM   #15
blanius
KoolMoves Moderator
 
blanius's Avatar
 
Join Date: Jul 2001
Location: Atlanta GA
Posts: 4,911
sounds like you have him covered then
blanius is offline   Reply With Quote
Old 12-20-2006, 01:44 PM   #16
Chris_Seahorn
up to my .as in work
 
Chris_Seahorn's Avatar
 
Join Date: Dec 2004
Posts: 4,364
Done deal

Last edited by Chris_Seahorn; 12-20-2006 at 04:14 PM.
Chris_Seahorn is offline   Reply With Quote
Old 12-21-2006, 01:55 PM   #17
Chris_Seahorn
up to my .as in work
 
Chris_Seahorn's Avatar
 
Join Date: Dec 2004
Posts: 4,364
Ok man...now that you are all set you know the rule on my stuff like this. What I make for one, I make available for everyone. I'll be submitting this to the Exchange for anyone in need. You'll want this version too since it is slightly different from the one I sent you yesterday.

Submitting now.
Chris_Seahorn is offline   Reply With Quote
Old 12-21-2006, 04:17 PM   #18
dniezby
Senior Member
 
Join Date: Jul 2001
Location: Tinley Park, IL
Posts: 702
What's going to be the name of the submission?
__________________
My Sites: Gaming Site Nightshade Studios MyKM Tutorials

--------------------------------------------------
What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape
dniezby is offline   Reply With Quote
Old 12-21-2006, 05:14 PM   #19
Chris_Seahorn
up to my .as in work
 
Chris_Seahorn's Avatar
 
Join Date: Dec 2004
Posts: 4,364
Section: MySQL
Name: Account Listing and Retrieval
ZIP: PD_ClanUsers.zip

I mentioned in the description that your request was the reason it was built.

Why?
Chris_Seahorn is offline   Reply With Quote
Old 12-21-2006, 05:37 PM   #20
dniezby
Senior Member
 
Join Date: Jul 2001
Location: Tinley Park, IL
Posts: 702
Just so I know where to find it.
__________________
My Sites: Gaming Site Nightshade Studios MyKM Tutorials

--------------------------------------------------
What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape
dniezby is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Product Support > Koolmoves

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:16 PM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.