;

PDA

Click to See Complete Forum and Search --> : KM & MySql


dniezby
12-19-2006, 10:51 PM
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.
------------------------------

Chris_Seahorn
12-19-2006, 11:18 PM
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/SQL_Menu1.html
http://flex.hobby-site.com/examples/SQL_Menu2/SQL_Menu2.html

Chris_Seahorn
12-19-2006, 11:21 PM
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.

dniezby
12-19-2006, 11:36 PM
LOL, I knew this would bring you out.

But kidding asside, here is what happens when I dump the SQL_Menu2.sql file
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
<?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

dniezby
12-19-2006, 11:46 PM
Here is the modified SQL_Menu2.sql code as phpmyadmin listed in my version.
-
-- 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

Chris_Seahorn
12-19-2006, 11:47 PM
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.

dniezby
12-20-2006, 12:06 AM
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.

Chris_Seahorn
12-20-2006, 12:22 AM
Yeah, some of the versions were nutty. :)

dniezby
12-20-2006, 03:05 AM
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.

Chris_Seahorn
12-20-2006, 03:20 AM
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. :)

blanius
12-20-2006, 08:58 AM
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

Chris_Seahorn
12-20-2006, 09:01 AM
He's all set.

blanius
12-20-2006, 10:51 AM
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.

Chris_Seahorn
12-20-2006, 11:03 AM
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. :)

blanius
12-20-2006, 11:53 AM
sounds like you have him covered then

Chris_Seahorn
12-20-2006, 01:44 PM
Done deal :thumbsup:

Chris_Seahorn
12-21-2006, 01:55 PM
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.

dniezby
12-21-2006, 04:17 PM
What's going to be the name of the submission?

Chris_Seahorn
12-21-2006, 05:14 PM
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?

dniezby
12-21-2006, 05:37 PM
Just so I know where to find it.

Chris_Seahorn
12-21-2006, 05:40 PM
It takes them a while to get my stuff approved due to the database and backends. I'm setting up downloads at my site if you need it now and I'll also post it to FK. Anything to help get the KM name out there.

Most people head to the Exchange when they are thinking of purchasing so it's worth being in all three (and any more I can find).

I added that one quick and turned on the downloads. It's gonna take forever to get my files mirrored but at least that one is in there right now while the Exchange goes through the process.

Chris_Seahorn
12-21-2006, 10:38 PM
OK, it's available at my site if needed. It uses a different backend routine for the retrieval dniezby so you might want this one. The downloads are hidden until registered for those who don't see on first visit (reg is easy).

Flashkit has the submission along with the Exchange but it takes them a bit to approve. Hit myforum if you have problems, same with any of my code or upcoming stuff.

dniezby
12-22-2006, 01:00 PM
Chris, you're awesome. Thanks for the help.

If you want to see what we worked out check out the Member Profiles at this site http://www.nssclan.org

It may look like something simple, but it definitely took some time to work out.

Chris_Seahorn
01-02-2007, 10:56 PM
I just got myBLOGG confirmed as a submission at Flashkit and the download totals for all my movies are at 7167 with the MySQL stuff being the most popular as I suspected it would.

myBLOGG will most likely be the most heavily downloaded one I have there over the long run for Koolmoves since it has admin but if even a small percentage of the users who comprise those download numbers right now tried out the Koolmoves demo to play with that stuff, I'll consider it all worth it.

blanius
01-02-2007, 11:15 PM
Impressive count Chris... The Blogg is great work and appreciated.

Chris_Seahorn
01-02-2007, 11:33 PM
I put Planet through a lot to get this one listed. This is the only one I had need to install a policy file for and I'm hoping people seeing it run in the live demo will have them heading off to Koolmoves main for a demo copy of the app. That's the hope anyway :)

Not sure how any of this has been toward the platform but I'll keep plugging :thumbsup:

Chris_Seahorn
01-03-2007, 12:26 AM
I quick grabbed the 5.7.2 update so I can ride a while because I have an evil plan ready to go into action.

Two years ago, opensourcecms.com wanted me to submit a Flash forum for listing there. The problem at the time was I cannot force any user to buy any platform. I can ENTICE them to buy something but cannot FORCE it since they promote opensource. The forum would have forced the end user to buy Swishmax so I just left the thought for dead.

myBLOGG on the other hand fits this required mold perfectly. I've made a special copy for opensourcecms.com that allows the end user to dynamically load the title graphic as well as the preloader graphic so they theoretically don't have to own Koolmoves to use this blog system. I know they have a HUGE userbase and the odds are someone will want to buy it just so they can alter the general look and with Koolmoves being so inexpensive it's an even better fit than Swish or Flash since the software itself will not break a pocketbook to buy. Will they have to? Nope Will some want to? Oh yeah.

In the KME and Flashkit submission I force the user to try Koolmoves by using a title graphic they WONT want to keep "Your Sitename Here" as well as the preloader image. To remove it they will have to use Koolmoves since it's hardcoded. This movie is so complicated they can't end run it by saying "well, I'll just scarf the backends and leave the KM frontend for dead". Won't fly...it's too complicated and they would have to edit it just to look at what matches what on the backend. I even pulled the SWF into other flash platforms to see how much coding gets skewed and I know the novice user is screwed as far as getting around using Koolmoves since the only way to see the scripting pristine is with KM. With these file repositories I do that and freely admit it and that is why. :))

Opensourcecms is massive and I will instead let curiosity kill my cat. It will be the only flash object they carry , will generate interest just because of that and will have the word Koolmoves everywhere on it. I couldn't pay for that kind of exposure to a huge existing userbase if I wanted to. It's my big bang on the way out. :yikes: :yikes:

For free they get the bland white look...for an extra $50 bucks they get to make the blog anything and personalize it. Perfect fit I say.

That my friends...is evil personified :)

this.Alex
01-03-2007, 01:51 AM
Nice work chris

dniezby
01-03-2007, 02:58 AM
LOL that is just hilarious man...Good idea. You sneaky bastard.

Chris_Seahorn
01-03-2007, 03:35 AM
OK...crossing my fingers...I just contacted the site admin...it may take a while because people get in line to get listed there but since this is the only SWF based item it may get attention. I just hope Scott (the head honcho) remembers me to speed it up. I even used my modship here at FK as leverage for attention (and I never do that....really I don't :))

Anything that shows this system can hold it's own with Flash proper helps and I've already kept the promise to mention Koolmoves numerous times in the email and the setup file itself (and all CCL licenses mention KM 5.7.2) describes the added options for this one if they are actual KM users and will have users WANTING to try KM....I hope.