Array to Grid

What might be an effective way to create a grid on the fly from a php array? I have an app that gathers text from the user and then I get the text and create an array from it when the user presses a button on the application. Now I want to display a grid from this back to the user that he can scroll, sort, and search the array data, then exit back to the application when done reviewing.

Any thoughts much appreciated.

Thank you

Lyle

[QUOTE=lyleholc;23331]What might be an effective way to create a grid on the fly from a php array? I have an app that gathers text from the user and then I get the text and create an array from it when the user presses a button on the application. Now I want to display a grid from this back to the user that he can scroll, sort, and search the array data, then exit back to the application when done reviewing.

Any thoughts much appreciated.

Thank you

Lyle[/QUOTE]

I would go for a temporary table or a fixed table with the sessionid or something as the primary key.

Hi Albert,

Yes, I took a look at MySql temporary table and sites said that it would be client browser specific so that one client’s results would automatically not collide with another, so sounded pretty good. I’m not sure how to go about this so that I can create the ScriptCase grid and form layout in advance though so that the results of the array can fill it. Any hint would be helpful.

Thanks so much.

Lyle

you can start with a fixed table, then when it works (only for one user of course) you can change it to temporary. Another option is that you create a table with a primary key, i.e. the userid and store the data into that. It’s more easy to work with SC on existing tables than temp. tables.

Hi Albert,

So I’m thinking of going the temp route and here’s what I think the steps would be. First, create the fixed table and the code to create the array and populate the fixed grid and related fixed form. Then create a clone of the fixed table such as called fixedgridname_temp. Then use an event such as OnApplicationInit where the array will be used to populate the temp grid and similarly for the temp form. But if MySql is creating the temp table in the user’s browser, it seems an Ajax event is needed. So I think maybe I’m not clear on what I need to fully do.

Thanks again for any thoughts/suggestions.

Lyle

Afaik the temp table is not in the browser but on the server. Keep in mind that using temp tables is just sql based like any other table. It’s just removed when the session is gone. So you just access it as any table. But to create your applications you need a table format of an existing table.

Thanks Albert!! I’ll work with this and see where I get. If the session approach is any better, let me know, but I don’t know much at all about that.

Best,

Lyle