M
M
Mrakobess2015-11-25 10:29:33
PHP
Mrakobess, 2015-11-25 10:29:33

What is the best way to add a word table to the database?

There is a site of firm, in it the catalog of products. Each product has a description and many have a table with parameters. Each product has its own table. Here is an example of the page www.eastexpress.com.ua/products/Stoyki-kabelnie
I am working on the site and I will fill the catalog at first.
Now there is a pdf catalog in which there are product descriptions, at best I will find the source - a Word document. Or I will draw a plate myself in a Word according to a pdf catalog.
How exactly to transfer the table to the database?
There is a solution that I don't like. This is to generate the html code of the table and enter it into the database as html. In principle, the tables will not be edited, once entered and that's it. But I strongly suspect that this is the wrong way.
What other options are there? I could not find a solution by searching, tk. the word table for databases is quite common.
And at the same time I will ask a question about the pictures for the product. Now there is a product-image value in the database with a link to the image. What if there are multiple pictures? Create image1, image2 etc.?
UPD. The database is now up and running. It has both ID and product-image and name and tech-params. Now there is stored a link to the image on the server. And don't add two pictures. Of course, you can put an array there, several links to pictures, then explode, but these are difficulties. Or create product-image1, product-image2, etc. But right now I don't know how many pictures I will have for one product. So far, two pictures are on average, but there may be more.
About the table. Now, for a trial product, I inserted the html code of the table into the tech-params field. As you can see it works. I don't know how to generate a table on the fly. Do not create a database for me for each product, this is nonsense. Moreover, the tables will be with a different number of columns and rows.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
NataliaCh, 2015-11-25
@NataliaCh

Now there is a product-image value in the database with a link to the image. What if there are multiple pictures? Create image1, image2 etc.?

One more table is usually made:
product_id | picture

M
Max, 2015-11-25
@MaxDukov

the question is not entirely clear. Do you currently have a static site? No DB?
If so, start with database design. Classically, only data is stored in the database, html code is generated in PHP.
about pictures - you can store the file name as one of the product parameters.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question