Skip to main content Help Control Panel

Login   A+   A-

Community «   Discussion forum «   Coffee machine «  

to import an idea

or how to import a table


hello,

I need help to use a data table (mysql) in YACS.
1) who must preserve his initial structure (several thousands of recordings)
2) who uses the rights of the users of YACS.
3) and allows to add to modify. recordings

if I use a OVERLAY in a section it is necessary to create the articles ...... for each recording
if I use an importation CSV in an article not possible (too much recordings…)not modifiable easy, export ?
if I use an importation of a table difficult to joint the  YACS fields
and those of the table… put aside the title ( bug with the delimitors….)

to summerize:
I have an old book of cooking, which comprises all my recipes,
I am attached to his struture…;
I would like in a YaCS-RECETTES section,
to post, each article being a recipe (a recording of the table) and to be able to add, modify the recipes with the same structure.

a simple idea;

Thank you

Bernard
avatar
from nearby-an-airport
Associate
6555 posts
registered on Sep. 12 2003

on Apr. 10


The best way to go is to create a dedicated PHP script to adapt data structure from the old database to the new one.

Basically, this would be a loop, reading each record from the old database, preparing an array of attributes in memeory, and submitting this to Articles::post() for the actual creation of new articles.

You may have a look at control/import.php and duplicate this script as a starting point?

Rate this page
Posted by Dobliu on Mar. 7, commented by Bernard on Apr. 10, (popular)