Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
Old 08-30-2007, 01:37 AM HTML pages?
Experienced Talker

Posts: 44
Trades: 0
HTMKAnyone know of a database app which stores records in html format on the web server and nt in a sql server. I have a specific need for this.

Or Does anyone have code that will take records from a Mysql database and copy each record to a seperate html page.
Anyone please help.
__________________

Please login or register to view this content. Registration is FREE

Best Place to hunt for Code
codingmaster is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-30-2007, 05:16 AM Re: HTML pages?
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
Trades: 0
Any app can store records in either sql backend. Depending on what kind of data, you can store a whole page, or "chunks" like a ul block with a bunch of li children in a long text column. Or if it's a user list, you can use varchar columns to store "<li>CodingMaster</li>" ... but that's not terribly efficient, and could wind up being very difficult to update down the line.

You can do a lot of the basics with queries and views, along the lines of Select '<li>' + Username + '</li>' From Userlist to store the raw data, but use it as if it's stored with html. At least that works for the simpler stuff, like a list of whatever, images, things like that. Entire pages tend to work better in a table with an id and a long text field.

But if that really doesn't work, you can resort to php: try a for loop to display each field in a record, with it's name and it's value, in a definition list - dl / dt / dd - and then save the page that generates. You could even stuff that into your new database. Still, I think storing the data separately from the markup is going to pay off over time.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 08-30-2007, 06:28 AM Re: HTML pages?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
I guess your forum name completly belies your actual coding skill, in the way that SEO & expert/guru/[insert place name] does. and you are just learning about databases and how to construct and use them.
The first thing to learn is; Size is expensive in terms of disk space and retrieval times and anything you can do to reduce that will pay big dividends as systems grow.

Text fields in database tables are just that, text.
The text stored there can take any form the programmer/DBA needs, HTML, javascript or even just plain old boring text.

I prefer to store textual data to be represented as HTML in a "BBCode" form, that is in the same way that forums do by using markup tags/placeholders that are replaced by HTML code on display.
so
Code:
<span style="color:red;background-color:yellow;font-size:20px;">This is highlighted with red on yellow</span>
would be stored in the field as
Code:
[hl st="r;y;20px;"]This is highlighted with red on yellow[/hl]
Then the data is parsed and the markup replaced as the output is streamed to the user agent.

Saves space in the database and makes updating the look of the pages easy.

Creating static pages is not required. You just create a navigation system and one page handles everything just like forums, blogs, CMS systems etc do.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?

Last edited by chrishirst; 08-30-2007 at 06:31 AM..
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-07-2007, 02:14 AM Re: HTML pages?
Experienced Talker

Posts: 44
Trades: 0
Thanks for your kind help.
__________________

Please login or register to view this content. Registration is FREE

Best Place to hunt for Code
codingmaster is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to HTML pages?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.16513 seconds with 12 queries