This may be a rather stupid, i.e. poor, concept, but if anyone knows of a
better method of doing this I am open to suggestions.

What I am doing is typing articles in word and saving them later as HTML
documents (MS Word generates horrid html files). I then have a form that
uploads the html file to the server and my php script file strips the text
above and below the <body>...</body> tags (these two tags are removed as
well). After doing this the script replaces the <img> tags with tags that
redirect the image src to the location
"/DBSI/<fileType>/<articleNo>/<imageNo>/<image file name>".

The script then generates a form that allows me to upload the corresponding
word, acrobat and all of the image files required for the page. These files
can then be accessed by calling the DBSI script, which simple grabs the blob
data from the database formats and header and sends it to the client.

By striping all of the header and footer information from the word document
I am in effect storing an html file that can be parsed into a template
easily.

Does anyone have better ideas.

Chad

> -----Original Message-----
> From: Ed Lazor [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 14, 2000 12:25 AM
> To: [EMAIL PROTECTED]
> Subject: RE: OT: Design Question: Storing web pages in a database.
>
>
> Very cool - thanks =)
>
> Question for you... the next issue I'm addressing is that this
> system will work very easily for storage of straight html.  Do
> you have any recommendations on how to integrate graphics into
> these documents?
>
> -Ed
>
>
>
> > Simple..  Two tables something like this (MySQL specific):
> >
> > create table docs (
> >     docid int(4) unsigned default '0' not null auto_increment,
> >     doctitle varchar(255) not null,
> >     synopsis blob not null
> >     primary key (docid)
> > );
> >
> > create table pages (
> >     pageid int(4) unsigned default '0' not null auto_increment,
> >     docid int(4) unsigned not null,
> >     pagetitle varchar(255) not null,
> >     seq int(4) unsigned not null,
> >     pagetext blob not null,
> >     primary key (pageid)
> > );
> >
> > The one-many relationship between docs.docid and pages.docid should be
> > evident, and tell you all you need..
> >
> > Make sure you addslashes() before inserting into the blob fields, and
> > stripslashes() when pulling back out of blobs.
> >
> > Here's a sample SQL statement that will grab page 3 of document
> number 17.
> >
> > SELECT
> >     d.doctitle, p.pagetitle, p.pagetext
> > FROM
> >     pages p, docs d
> > WHERE
> >     d.docid = 17 AND d.docid = p.docid AND p.pageid = 3;
> >
> > --
> >                  Jason Costomiris <><
> >             Technologist, cryptogeek, human.
> > jcostom {at} jasons {dot} org  |  http://www.jasons.org/
> >
> >
> > --
> > To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
> > as the Subject.
> >
> >
>
>
> --
> To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
> as the Subject.
>


-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to