Help - Search - Members - Calendar
Full Version: embed database into html file for offline usage?
HTMLHelp Forums > Programming > Databases
gocyn
Hello,

I was wondering if it was possible to some how embed a database into a html file. Well more like, I want to be able to distribute an offline version of a website that uses a database. Would that be possible?

Or do you need a server to use html and a database together?

Thank you for your help.
Brian Chandler
No.

(HTH. Of course, it all depends on exactly what you mean by "embed", but No seems the simplest answer.)
gocyn
QUOTE(Brian Chandler @ Aug 13 2007, 03:28 PM) *

No.

(HTH. Of course, it all depends on exactly what you mean by "embed", but No seems the simplest answer.)


Well "embed" was a bad choice of words. I really just wanted to know if there is a way to make an offline version of a database driven html page.
Darin McGrew
Well, you could generate static documents from the database and make them available.

Or you could make an "offline" version of the database available, but then it's no longer really an offline version of the page. It's just using a replica of the database.
gocyn
QUOTE(Darin McGrew @ Aug 13 2007, 04:02 PM) *

Well, you could generate static documents from the database and make them available.

Or you could make an "offline" version of the database available, but then it's no longer really an offline version of the page. It's just using a replica of the database.


Thank you. I think that is exactly what I'm talking about doing. Since the database itself is just a book, (similar to some sites that have searchable bibles on their site), so the information in the database will never change. And basically the reason why I want to make the database itself available is to maintain the same searching functionality.

But I have no clue how to generate a .html from a database. Do you know of any tutorials available online that covers this?

Thank you guys again for the help.
Brian Chandler
QUOTE
But I have no clue how to generate a .html from a database. Do you know of any tutorials available online that covers this?


Well, "a database" typically means stuff held in a MySQL (etc) system, and in the context of websites this normally means it's used to "drive" the website. That means that a program (PHP, Perl etc) is querying the database and generating web pages. You can immediately and directly save those webpages, and distribute them as html documents.

In other words, I can't really understand how you can have "a database" without already having some means of generating html pages from it. Can you give us a URL, or say how you currently view the information?

markei
QUOTE(Brian Chandler @ Aug 13 2007, 10:34 PM) *

QUOTE
But I have no clue how to generate a .html from a database. Do you know of any tutorials available online that covers this?

Well, "a database" typically means stuff held in a MySQL (etc) system, and in the context of websites this normally means it's used to "drive" the website. That means that a program (PHP, Perl etc) is querying the database and generating web pages. You can immediately and directly save those webpages, and distribute them as html documents.
In other words, I can't really understand how you can have "a database" without already having some means of generating html pages from it. Can you give us a URL, or say how you currently view the information?

Information is limited, but I'll take a stab.
You can generate a text file version of your database by exporting it to a text-based file(if MySQL, you can do it directly from phpMyAdmin), then either use the text file itself as the source for your "offline" website or import the file into another database(such as Access) on the computer you're running the "offline" site on. In either case, you're re-creating the database, so presumeably you own the original, and can access it to do this, and then you will also know how to re-code the site to access the new database instead of the one on the server.

OR, as Brian has stated, save the individual web pages generated from the database, but this may be unbearably time consuming, depending on the size of the data involved.

This sounds like what you want to do from the limited information provided.

Hope it helps,
markei
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.