Re: Re: Read file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You would benefit from using XML for these data structures. XSLT can be used to quickly filter records stored on the clients computer locally. The client can then make changes to desired records and upload the XML file fragment to the server. The server then has a much lower load as it only has to process the changed records.

I would (and have) get the user to download a ZIP file containing the XML file, a web page which processes it and some javascript support files. When the ZIP is unpacked, the page can then load the XML file from the current directory (containing the web page), you would not need to know anything about the user's directory structure, and they would not have to browse for the file when they use your application.

Another optimisation might be to have the client browser start, and then query a URL provided by you. The URL would offer a 'last-updated' date as another XML file. Comparing this with a value which you store inside your provided XML file would allow the browser to alert the user that a new file was available, and to visit your website to download a new ZIP file.

Both IE and Mozilla support loading and scripting of XML / XSL transformations

In IE you might want to read up on the xmlhttp.load and xmlhttp.send function to read remote XML files. (This will require MSXML2.6 or above)

Hope that helps, I'm not really too sure what you are trying to do, even with your description below - maybe a diagram would help us to understand your problem ?

Cheers - Neil

At 15:00 18/11/2003 +0000, Ng Hwee Hwee

From: "Ng Hwee Hwee" <hhwee@xxxxxxxxxxx>
To: "Michael Scappa" <mscappa@xxxxxxxxxxx>, <php-db@xxxxxxxxxxxxx>
Date: Tue, 18 Nov 2003 10:27:26 +0800
MIME-Version: 1.0
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: Re:  Read file

what about using cookies?

my problem is this: i have about 10,000 hotels records and each of them has
information about its location, its hotel code, its hotel tel, its country
code etc... i would like to load this into the clients computer so that when
they enter a hotel code, all the information will be reflected in the form
using onChange()... if 50 employees were to query the database always for
these 10,000 records, i'm afraid the server can't take the traffic and die..
so i was thinking of uploading a CSV file into my client's computer and then
have my scripts find the file and read the file for Javascript to process...
since the information in the file changes ususally only once a year, i don't
have to worry that they will have back-dated information..

i'm desperate for enlightenment! thanx!! :o)

blessings,
hwee

-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux