By vmira27 on
Hello,
I have a database with 1000 records
Hotel Address Telephone Fax Description
Flora address1 1234565 3223 A nice hotel
Belvedere address2 4345343 3242 A very nice hotel
............
and i want to create content (pages) from this database. The page name must be the hotel name and the content of the page must contain the address, telephone, etc.
To create these pages manually is not an option. Do you have any idea how to automate this work?
Thank you!
Comments
Use CCK and then manually upload the fields
Create a custom content type for Hotel with the fields address, telephone etc.
Then you could do a mass upload, either by reading a file or a database table you can create for the purpose and import using phymyadmin.
Here is a php script that you can use a guide:
http://drupal.org/node/292904
You would need to modify the script so that the cck fields are updated correctly...see:
http://www.lullabot.com/articles/an_introduction_to_the_content_construc...
I would recommend referring to a good book on druapal API like Pro Drupal Development. I think this would be an afternoons worth of work if you are familiar with PHP.