Meaning of tables and columns in Coppermine database Meaning of tables and columns in Coppermine database
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Meaning of tables and columns in Coppermine database

Started by QuaySo, March 16, 2005, 12:30:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

QuaySo

Hello,

I'm using Coppermine for a few days now and have 1 question I couldn't find an answer in the documentation. Is there a description of the Coppermine database model?
I'm asking this, because I would like to add some info to the pictures using a script. At this time I have all pictures in my IMatch image database including a lot of information about photgrapher, date/time taken, equipment etc. This info should go to Coppermine. Therefo I should have some insight in the datamodel. Most of the tables and columns are quite easy to understand, but a few I don't know....

For instance: the table cpg132_pictures contains two columns with time information:
- mtime     timestamp(14)
- ctime      int(11)

What are they used for? And how do I store a time in ctime? This integer value does not mean anything to me yet....

Any help (a link to documentation I have overlooked?) would be appreciated!

-- Arno

Nibbler

There isn't such a document unfortunately.

The mtime holds when the pic was last viewed
The ctime holds when the pic was uploaded as a unix timestamp

the unix timestamp is the number of seconds passed since Jan 1st 1970 - google for it and check the php date and time functions.

QuaySo

Hi Nibbler,

Thanks for your fast response. Your explanation answers my first questions about mtime and ctime. I will proceed making my scripts and hope not to bother you too often with questions about the meaning of database objects.

-- Arno

Nibbler

Maybe when the scripts are done you can return and post them on the board to help others looking to do the same thing. :)

donnoman

probably looking at nibbler's timer script would help you out as well. It's a batch add /auto create cat/album structure hack that probably could be used in some way shape or form for anybody looking to convert from another gallery.

QuaySo

Donnoman, thanks for your hint. It might be good not to invent the wheel again!!

One problem. I've been looking for this script, but wasn't able to find it. Can you please point me to the secret place?  ;)

-- Arno

donnoman


QuaySo

Thanks again. I hope to find some time to play around with this code next weekend...

-- Arno