Wrox Programmer Forums
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Flash (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 2nd, 2006, 01:35 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default sendAndLoad Arrays to MySQL

Hello Everybody,
I have a dynamic multi-dimensional array, I am using sendAndLoad to store the information in MySQL. I can get it to send and store. The problem is the format that it is storing is like a plain array like such

0, MovieClip_0, 2, blahblah, Edge, 2, Some Text, Some More Text, Even More Text

I need to be able to retrieve the data and restore it back in the multi-dimensional format. The only way I can think to do this is to write the array out to a string and add some split characters like ~ or || then write some code to rebuild the array using the SPLIT function. This seems like a long and tedious way to do this. Does anybody else have any ideas or advice?

var RoomItems_arr:Array = new Array();

for(var l:Number=0; l < iItemCount; l++) {
    RoomItems_arr[l] = new Array();

    RoomItems_arr[l][0] = l;
    RoomItems_arr[l][1] = "MovieClip_"+l;
    RoomItems_arr[l][2] = 2;

    RoomItems_arr[l][3] = new Array();
    for(var i:Number=0; i <= iSideCount; i++) {
        RoomItems_arr[l][3][i] = new Array();
        RoomItems_arr[l][3][i][0] = "blahblah;
        RoomItems_arr[l][3][i][1] = "Edge";
        RoomItems_arr[l][3][i][2] = 2;
    }

    RoomItems_arr[l][4] = "Some Text";
    RoomItems_arr[l][5] = "Some More Text";
    RoomItems_arr[l][6] = "Even More Text";

}

Thanks In Advance
mike
__________________
Peace
Mike
http://www.eclecticpixel.com
 
Old May 11th, 2006, 07:40 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 385
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am not sure I follow your request. Do you want to retrieve multiple fields and put them in an array to display with flash? Then possibly allow the user to change the data and send the data back?

If so check out this project. It uses arrays, data grids, insert/update/delete sql functionality with mysql and php.

http://flash-creations.com/notes/ser...m_database.php

it does all the basics.






Similar Threads
Thread Thread Starter Forum Replies Last Post
arrays Abraham Java Basics 5 April 11th, 2009 11:10 PM
Mysql,PHP and arrays swedge MySQL 1 February 15th, 2006 07:55 AM
Converting mysql arrays to strings robertjshillito Beginning PHP 3 February 25th, 2005 04:11 PM
Multidemmesional Arrays OR arrays gmoney060 Classic ASP Basics 3 November 1st, 2004 03:42 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.