CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 List Box values without requerying the db

Print topic Send  topic

Author Message
Tom
Posted: 05/10/2002, 11:19 AM

Unfortunately, I have to put two separate listboxes on a form that 'look up' their values from the db. Each list has over 300 values and even though I have indices to pull the data up quickly, it takes several seconds to bring the data back.
Since my web app users hit this page often, how can I keep from going back to the db to lookup?
One idea I have is to run my list box query and store the results in an array/structure when they log in and somehow get CC to display that data in a list box. I don't really want to custom code to the point that I can't 'generate' the form (I have no trouble working with the events in CC ).
Looking for any ideas
Brent
Posted: 05/10/2002, 11:57 AM

Have a function that traverses the table and generates an include file like
$lkup_list = "1;one;2;two;...."; //use whatever values you like
So you only need to run this function when the lookup values change.

Then include this file at the appropriate event, maybe Before Open.
include("mylkup.php");
This simply assigns the lookups to $lkup_list.

Now use $lkup_list for the event list instead of typing them in. :)

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.