I have a huge number of albums & nested albums to add in Mediashare. The nested albums are identically repeated inside each upper-level album. Instead of adding them one at a time, I was thinking about just going into the database and copying the rows over & over, while changing the ms_id, and the ms_parentAlbumId, as I add them... It would save me hours in the long run.
However, I am not sure about the field labeled "ms_viewkey". What is that for? I'm sure it is system generated, and each of them so far are totally different, so if I copy the rows, and don't change this field, is it going to cause a problem?
Are there any other problems you can foresee with this approach?
Thanks for your help!
After looking again, it also looks like I need to change the fields ms_nestedsetleft and ms_nestedsetright, but those look like they are sequential and no problem.
--
From the Ashes of Disaster
Grow the Roses of Success
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- rgasch created topic »Using PageUtil::addVar() to load script code« 11:48 AM
- michiel responded to »password problem« 10:01 AM
- mazdev responded to »Hide "Register new account" and change template to 3 col« 07:50 AM
- mesteele101 created topic »Zikula 1.3.3 - Site Search 1.5.2 - Unable to turn off plug-ins« 07:48 AM
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Working with Database tables in Mediashare - will this work?
-
- Rank: Freshman
- Registered: Jul 29, 2002
- Last visit: Oct 24, 2009
- Posts: 97
-
- Rank: Helper
- Registered: Dec 31, 1969
- Last visit: May 07, 2010
- Posts: 507
If I'm not mistaken, the viewkey is the unique identifier for each media item. To verify that, look at an image you've already uploaded that's working and look at the URL. If it matches the viewkey for that item in the database then you have your answer.
I really don't know how you'd fake that number for an import. It might be meaningless other than needing to be unique, so you could come up with your own unique ids and give it a try. Experiment :)
Alternatively you could look through the module code and see how viewkey is created to find out if it has to be constructed in any particular way. -
- Rank: Freshman
- Registered: Jul 29, 2002
- Last visit: Oct 24, 2009
- Posts: 97
thanks bronto, I'll experiment with it & keep my fingers crossed for the not needing to be unique part! I don't really know enough about PHP coding to understand all of what I'd be seeing, but it would be a good opportunity to learn more I suppose.
thanks for your help once again.
--
From the Ashes of Disaster
Grow the Roses of Success
- Moderated by:
- Support
