Program/Process to Transform Database Records to HTML files

aceman817

Senior member
Jul 15, 2001
204
0
0
Hi all,

Working on a project in which there are thousands of records in various Access or SQL databases that need to be exported to individual HTML files. The tables will need to be joined and a kind of template will need to be made for the HTML page itself (for tables, colors, text formatting, etc). I know I can do this with something like a single ASP or PHP page using CSS and querying the database directly, but I need to generate the thousands of records into formatted HTML files to be indexed by a search system. Is there a process and/or program that you can suggest for this?

Thanks,
Al
 

lozina

Lifer
Sep 10, 2001
11,709
8
81
Unfortunately, I can't think of any program that would do this for you but it sounds fairly straightforward to make yourself using something like C#. What do you mean by the tables will need to be joined? That the results of a query involving multiple tables would need to be put on a single HTML page or that there would be hyperlinks to link the individual html files?

Hey here's one idea that might work without any fancy custom tools... depending on how complicated the individual html pages are. If they are not too complex you can write your individual html pages using a select. For example, let's say you have a table called vehicles which has columns make, model and year. And you want individual html pages for each vehice. Write a query like:

select '<html><body><p class="title">' || v.make || '</p><table style="border : 1 px solid black"><tr><td>Model:</td><td>' || v.model || '</td></tr><tr><td>Year:</td><td>' || v.year || '</td></tr></table></body></html>' as html from vehicles v order by v.make

so that will give you a result set of one column where each row contains html content representing that record. Save the results to a text file and run some simple string splitting code to split on the </html> tag and save each part as a separate html file.
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,292
3,914
75
A couple of ideas come to mind. If you feel like learning a new, functional programming language, you could try an XML export and XSL to make it into HTML.

If you don't feel like learning a new language, you could make an ASP or PHP page, and run a batch of WGets against that page to make static HTML. If you can make an index page for all the records, one wget command could do it all at once!
 

aceman817

Senior member
Jul 15, 2001
204
0
0
Thanks for the quick replies. I mean that HTML files will need to be generated for each "record" without any hyperlinks. One HTML file per "car" using this example:

Car Info Table
---------------------
Car ID (PK)
Make
Model
Color


Service Record Table
---------------------------
Car ID (FK)
Service Type (Oil change, tune-up, body work, etc.)
Date


Something like this where each service record will be put on an HTML page with the top of the page containing info on the car type. One car per HTML page and each page (car) will have multiple services associated with it. If it can be done with a PHP script or something that would be great. Right now most of the info is in a MS Access database and I don't see a way that Access reports can do it to HTML pages this way. I have done some programming work with PHP before so would prefer this over learning XML/XSL. A simple example would be great!

Thanks,
Al
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |