Hi PPl.. :) Another of my site going Drupal.

But i have a problem here. First of all its huge, i do not want the traffic to be affected when i migrate it to Drupal. The new Drupal site is under development, and i need to migrate all data there.

Here is the structure for current site database:

main table: This has newsID(planned Node ID), Category(Taxonomy term), Date of article and the pagename(this is being used to get the image file associated), Table Name: This is where the full story is stored, Image ID: 1 if there's an image, 0 if no image. Image is always Pagename.jpg or say heading.jpg

NewsID----CatID----Date----PageName----TableName----ImageID

Month Table(Each month a new table is created for the content of that month), current month its story_112005

StoryID----NewsID----Heading----Summary----TopPara----Newsbody

I'm using flexinode-1 now for the news, and i need help in migrating this data to the new database. If anybody here can guide me how should i go about it. I am not a pro in PHP/MySQL but if guided can do this on my own.

Thanks for going through the long post, looking forward to getting some attention and support here.

Sham

Comments

netceo’s picture

hi ppl. i have found somebody locally to do this for me but am not able to understand this info in serialised data for the image field in my flexinode-data table.. i just have a plain pic attached to my current system and want to migrate that along with all the data.. can somebody throw some light on this please?

O:8:"stdClass":6:{s:8:"filename";s:32:"Bihar_Enter_Nitish
_Exit_Lalu.jpg";s:8:"filemime";s:10:"image/jpeg";s:8:"filepath";s:38:
"files/Bihar_Enter_Nitish_Exit_Lalu.jpg";s:5:"error";i:0;s:8:"filesize";i:9189;s:
6:"source";s:11:"flexinode_1";}

NetCEO

netceo’s picture

Somebody please help here.. I'm stuck!
NetCEO

nevets’s picture

To unserialize that use unserialize() like

<?php
$obj = unserialize($data);
// In this case the fields are refered to as
// $obj->filename
// $obj->filemime
// $obj->filepath
// $obj->error
// $obj->filesize
// $obj->source
?>

In your case you want to create an object of type stdClass() like this, $obj = new stdClass() and then fill in the fields using the existing data.

If you want to know how to "read" the data, see below, my comments are in square brackets
It will give you a clue on what is expected in each field.

O:8:
"stdClass":6:  [Thing represents an object of type standard class (stdClass) with six members]
{
s:8:"filename";s:32:"Bihar_Enter_Nitish_Exit_Lalu.jpg";
[Fieldname = filename, Value = Bihar_Enter_Nitish_Exit_Lalu.jpg (type=string)]
s:8:"filemime";s:10:"image/jpeg";
[Fieldname= filemime, Value =  (type=string)]
s:8:"filepath";s:38:"files/Bihar_Enter_Nitish_Exit_Lalu.jpg";
[Fieldname= filepath, Value = files/Bihar_Enter_Nitish_Exit_Lalu.jpg (type=string)]
s:5:"error";i:0;
[Fieldname= error, Value = 9189 (type=integer)]
s:8:"filesize";i:9189;
[Fieldname= filesize, Value = 9189 (type=integer)]
s:6:"source";s:11:"flexinode_1";
[Fieldname= source, Value = flexinode_1 (type=string)]
}
gaurav_asr@drupal.org’s picture

Can you tell me how it works please

nevets’s picture

When you say "Can you tell me how it works please", how does what work?