Multiple paragraphs; The trick?
| From: | Jelle Ferwerda | Date: | Mon, 12 Nov 2001 22:25:09 +0000 |
| Subject: | Multiple paragraphs; The trick? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-14263@lists.php.net to get a copy of this message | ||
HI all,
Just a week or so ago I started testing PHP and MySQL databases. Testing is over. I have figured out
the basic controls etc. and it is time for the construction of the database and the PhP scripts to
get the site up and running. The general layout of the database and its tables is more or less clear
to me, except for one important point, for which I would like some advise..
How do you generate multiple paragraphs as output, if they do not have specific characteristics.
Say: I am building a database about a sensor, and this page covers like 2 pages of A4 text.
Obviously I'd like to make more then one paragraph and add some layout&imagery between
paragraphs. How do you put it in a database? (Say: Like this message: The sender is me, the subject
is multiple paragraphs, so you should be able to select the message. How do you get the formatting
in different paragraphs, since it is not with a specific title, intro paragraph, main text and
footer text). Any number of paragraphs and images is possible, so I cannot just create a field for
each paragraph.
Do you put all text as one entry in one field, with HTML to format the paragraphs? I think it would
work, but it doens't seem like it is THE solution..
Or should I add a table in which you put the paragraphs, which you select through your main
database, and then sort by paragraph number?
Like:
Table sensors
[Sensor][compagny][country]..[sensor_ID]
Table Contents
[Sensor_No][Para_No][Content]
The answer is probably obvious to you, but for a newbie like me... My database-design book is
unfortunatey not made for building databases for the web, and do not explain this sort of
structures. Unfortunately: SQL queries fail miserably in my brain.. Probably need a mental upgrade
here..
Hope you can help!
Thanks,
Jelle.
--
******************
Ir. Jelle G. Ferwerda
******************
Mankind:
Intelligent enough to make a strong impact on the environment,
But not strong enough to make an intelligent one!
******************